linux/drivers/leds/rgb
Uwe Kleine-König 384461abca pwm: Manage owner assignment implicitly for drivers
Instead of requiring each driver to care for assigning the owner member
of struct pwm_ops, handle that implicitly using a macro. Note that the
owner member has to be moved to struct pwm_chip, as the ops structure
usually lives in read-only memory and so cannot be modified.

The upside is that new low level drivers cannot forget the assignment and
save one line each. The pwm-crc driver didn't assign .owner, that's not
a problem in practice though as the driver cannot be compiled as a
module.

Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> # Intel LPSS
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> # pwm-{bcm,brcm}*.c
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> # sun4i
Acked-by: Andi Shyti <andi.shyti@kernel.org>
Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp> # pwm-visconti
Acked-by: Heiko Stuebner <heiko@sntech.de> # pwm-rockchip
Acked-by: Michael Walle <michael@walle.cc> # pwm-sl28cpld
Acked-by: Neil Armstrong <neil.armstrong@linaro.org> # pwm-meson
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230804142707.412137-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2023-10-13 10:07:17 +02:00
..
Kconfig leds: rgb: Add a multicolor LED driver to group monochromatic LEDs 2023-08-17 09:01:00 +01:00
leds-group-multicolor.c leds: rgb: Add a multicolor LED driver to group monochromatic LEDs 2023-08-17 09:01:00 +01:00
leds-mt6370-rgb.c leds: rgb: mt6370: Fix implicit declaration for FIELD_GET 2023-03-23 14:54:14 +00:00
leds-pwm-multicolor.c leds: pwm-multicolor: Simplify an error message 2023-04-20 12:32:14 +01:00
leds-qcom-lpg.c pwm: Manage owner assignment implicitly for drivers 2023-10-13 10:07:17 +02:00
Makefile leds: rgb: Add a multicolor LED driver to group monochromatic LEDs 2023-08-17 09:01:00 +01:00