54692410 | 25-Jul-2023 |
Fenglin Wu <quic_fenglinw@quicinc.com> |
leds: flash: leds-qcom-flash: Put child node if registration failed
Put the child node if register flash LED device failed.
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com> Link: https://lore.
leds: flash: leds-qcom-flash: Put child node if registration failed
Put the child node if register flash LED device failed.
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com> Link: https://lore.kernel.org/r/20230725-leds-qcom-flash-driver-tiny-fixes-v2-3-0f5cbce5fed0@quicinc.com Signed-off-by: Lee Jones <lee@kernel.org>
show more ...
|
7c47381c | 25-Jul-2023 |
Fenglin Wu <quic_fenglinw@quicinc.com> |
leds: flash: leds-qcom-flash: Turn off LED before setting flash current
Strobe off the LED before setting flash current to avoid it's being enabled with an incorrect current if it has been working i
leds: flash: leds-qcom-flash: Turn off LED before setting flash current
Strobe off the LED before setting flash current to avoid it's being enabled with an incorrect current if it has been working in torch mode.
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com> Link: https://lore.kernel.org/r/20230725-leds-qcom-flash-driver-tiny-fixes-v2-2-0f5cbce5fed0@quicinc.com Signed-off-by: Lee Jones <lee@kernel.org>
show more ...
|
b3f4b679 | 31-May-2023 |
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> |
leds: flash: leds-qcom-flash: Fix an unsigned comparison which can never be negative
The variable 'count' is defined as unsigned type, so the following if statement is invalid, we can modify the typ
leds: flash: leds-qcom-flash: Fix an unsigned comparison which can never be negative
The variable 'count' is defined as unsigned type, so the following if statement is invalid, we can modify the type of count to int.
if (count <= 0) { dev_err(dev, "No led-sources specified\n"); return -ENODEV; }
./drivers/leds/flash/leds-qcom-flash.c:546:5-10: WARNING: Unsigned expression compared with zero: count <= 0.
Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5344 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20230531053559.5702-1-jiapeng.chong@linux.alibaba.com
show more ...
|
36af333a | 24-May-2023 |
Azeem Shaikh <azeemshaikh38@gmail.com> |
leds: as3645a: Replace strlcpy with strscpy
Part of a tree-wide effort to remove deprecated strlcpy()[1] and replace it with strscpy()[2]. No return values were used, so direct replacement is safe.
leds: as3645a: Replace strlcpy with strscpy
Part of a tree-wide effort to remove deprecated strlcpy()[1] and replace it with strscpy()[2]. No return values were used, so direct replacement is safe.
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [2] https://github.com/KSPP/linux/issues/89
Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com> Link: https://lore.kernel.org/r/20230524144824.2360607-1-azeemshaikh38@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
show more ...
|
91fe1bda | 07-May-2023 |
Dylan Van Assche <me@dylanvanassche.be> |
leds: flash: leds-qcom-flash: Disable LED when changing brightness
The Qualcomm PMI8998 PMIC requires the LED to be disabled when configuring the brightness. Always disable the LED when setting the
leds: flash: leds-qcom-flash: Disable LED when changing brightness
The Qualcomm PMI8998 PMIC requires the LED to be disabled when configuring the brightness. Always disable the LED when setting the brightness and re-enable it afterwards.
Signed-off-by: Dylan Van Assche <me@dylanvanassche.be> Link: https://lore.kernel.org/r/20230507172941.364852-3-me@dylanvanassche.be Signed-off-by: Lee Jones <lee@kernel.org>
show more ...
|
22dc3789 | 17-Mar-2023 |
Tom Rix <trix@redhat.com> |
leds: flash: Set variables mvflash_{3,4}ch_regs storage-class-specifier to static
Smatch reports:
drivers/leds/flash/leds-qcom-flash.c:103:18: warning: symbol 'mvflash_3ch_regs' was not decla
leds: flash: Set variables mvflash_{3,4}ch_regs storage-class-specifier to static
Smatch reports:
drivers/leds/flash/leds-qcom-flash.c:103:18: warning: symbol 'mvflash_3ch_regs' was not declared. Should it be static? drivers/leds/flash/leds-qcom-flash.c:115:18: warning: symbol 'mvflash_4ch_regs' was not declared. Should it be static?
These variables are only used locally, so it should be static.
Signed-off-by: Tom Rix <trix@redhat.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20230317191341.1670660-1-trix@redhat.com
show more ...
|
fa31e422 | 10-Mar-2023 |
ChiYuan Huang <cy_huang@richtek.com> |
leds: flash: mt6370: Add MediaTek MT6370 flashlight support
The MediaTek MT6370 is a highly-integrated smart power management IC, which includes a single cell Li-Ion/Li-Polymer switching battery cha
leds: flash: mt6370: Add MediaTek MT6370 flashlight support
The MediaTek MT6370 is a highly-integrated smart power management IC, which includes a single cell Li-Ion/Li-Polymer switching battery charger, a USB Type-C & Power Delivery (PD) controller, dual Flash LED current sources, a RGB LED driver, a backlight WLED driver, a display bias driver and a general LDO for portable devices.
Add support for the MT6370 Flash LED driver. Flash LED in MT6370 has 2 channels and support torch/strobe mode.
Co-developed-by: Alice Chen <alice_chen@richtek.com> Signed-off-by: Alice Chen <alice_chen@richtek.com> Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Signed-off-by: ChiaEn Wu <chiaen_wu@richtek.com> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/52480420a160e5a4c71715fbbf105e684a16e7c2.1678430444.git.chiaen_wu@richtek.com
show more ...
|
22a23436 | 15-Aug-2022 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
leds: lm3601x: Improve error reporting for problems during .remove()
Returning an error value in an i2c remove callback results in a generic error message being emitted by the i2c core, but otherwis
leds: lm3601x: Improve error reporting for problems during .remove()
Returning an error value in an i2c remove callback results in a generic error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called.
So instead of triggering the generic i2c error message, emit a more helpful message if a problem occurs and return 0 to suppress the generic message.
This patch is a preparation for making i2c remove callbacks return void.
Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Wolfram Sang <wsa@kernel.org>
show more ...
|
69175786 | 05-May-2022 |
Markuss Broks <markuss.broks@gmail.com> |
leds: ktd2692: Make aux-gpios optional
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
leds: ktd2692: Make aux-gpios optional
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>
show more ...
|