summaryrefslogtreecommitdiff
path: root/drivers/leds/flash/leds-ktd2692.c
AgeCommit message (Collapse)AuthorFilesLines
2024-03-07leds: ktd2692: Convert to use ExpressWire libraryDuje Mihanović1-89/+27
The KTD2692 uses the ExpressWire protocol implemented in the newly introduced ExpressWire library. Convert the driver to use the library. Suggested-by: Daniel Thompson <daniel.thompson@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr> Link: https://lore.kernel.org/r/20240125-ktd2801-v5-2-e22da232a825@skole.hr Signed-off-by: Lee Jones <lee@kernel.org>
2023-11-01leds: Convert all platform drivers to return voidUwe Kleine-König1-4/+2
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). All platform drivers below drivers/leds/ unconditionally return zero in their remove callback and so can be converted trivially to the variant returning void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230917130947.1122198-1-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones <lee@kernel.org>
2022-05-08leds: ktd2692: Make aux-gpios optionalMarkuss Broks1-3/+2
Make the AUX pin optional, since it isn't a core part of functionality, and the device is designed to be operational with only one CTRL pin. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Markuss Broks <markuss.broks@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2022-05-08leds: ktd2692: Avoid duplicate error messages on probe deferralMarkuss Broks1-8/+4
Use dev_err_probe instead of dev_err to avoid duplicate error messages if the GPIO allocation makes the probe defer. Signed-off-by: Markuss Broks <markuss.broks@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2022-01-12leds: ktd2692: Drop calling dev_of_node() in ktd2692_parse_dtLad Prabhakar1-1/+1
output of dev_of_node() is already assigned to "np" variable in ktd2692_parse_dt(). Use "np" variable to check if OF node is NULL instead of calling dev_of_node() again. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-07-12leds: ktd2692: Move driver to flash subdirectoryLinus Walleij1-0/+424
We created a subdirectory for LED drivers that depend on CONFIG_LEDS_CLASS_FLASH, and this driver does so let's move it there. Cc: Ingi Kim <ingi2.kim@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>