summaryrefslogtreecommitdiff
path: root/include/linux/pwm.h
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-04-07 10:01:54 +0200
committerThierry Reding <thierry.reding@gmail.com>2021-06-28 13:17:48 +0200
commitbcda91bf86c1ff7647df85029d69f2aed80f210e (patch)
treef8a137e253d0c4afbfde04f3044c2073b892fe2b /include/linux/pwm.h
parentd233504af7db9f4ddbbc4b04513d5ca657e7ae1f (diff)
pwm: Add a device-managed function to add PWM chips
This potentially simplifies low-level PWM drivers. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'include/linux/pwm.h')
-rw-r--r--include/linux/pwm.h3
1 files changed, 3 insertions, 0 deletions
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);