diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2024-04-15 07:35:55 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-04-16 12:10:05 +0200 |
commit | 66cc09c044abc08ce5d55b793f770883c2b205ab (patch) | |
tree | 7113932833071993f29cd740af541652d4678d13 /include | |
parent | 9c2ce11137522e61cb922ceaa54219fc38ae7146 (diff) | |
download | barebox-66cc09c044abc08ce5d55b793f770883c2b205ab.tar.gz barebox-66cc09c044abc08ce5d55b793f770883c2b205ab.tar.xz |
PWM: core: add struct pwm_chip::dev
For compatibility with Linux, let's add a dev member into struct pwm_chip
instead of passing it as argument to pwmchip_add
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240415053600.370622-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/pwm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/pwm.h b/include/pwm.h index 4d403fe174..5157fee7d4 100644 --- a/include/pwm.h +++ b/include/pwm.h @@ -128,12 +128,14 @@ struct pwm_ops { /** * struct pwm_chip - abstract a PWM + * @dev: device providing the PWMs * @id: The id of this pwm * @devname: unique identifier for this pwm * @ops: The callbacks for this PWM * @state: current state of the PWM */ struct pwm_chip { + struct device *dev; int id; const char *devname; const struct pwm_ops *ops; @@ -141,7 +143,7 @@ struct pwm_chip { struct pwm_state state; }; -int pwmchip_add(struct pwm_chip *chip, struct device *dev); +int pwmchip_add(struct pwm_chip *chip); int pwmchip_remove(struct pwm_chip *chip); #endif /* __PWM_H */ |