From bcda91bf86c1ff7647df85029d69f2aed80f210e Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Wed, 7 Apr 2021 10:01:54 +0200 Subject: pwm: Add a device-managed function to add PWM chips MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This potentially simplifies low-level PWM drivers. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding --- include/linux/pwm.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/pwm.h') diff --git a/include/linux/pwm.h b/include/linux/pwm.h index 5a73251d28e3..892ece4d4cfa 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h @@ -405,6 +405,9 @@ void *pwm_get_chip_data(struct pwm_device *pwm); int pwmchip_add(struct pwm_chip *chip); int pwmchip_remove(struct pwm_chip *chip); + +int devm_pwmchip_add(struct device *dev, struct pwm_chip *chip); + struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip, unsigned int index, const char *label); -- cgit v1.2.3-73-gaa49b