This is a note to let you know that I've just added the patch titled power: supply: leds: Fix blink to LED on transition to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: power-supply-leds-fix-blink-to-led-on-transition.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From e4484643991e0f6b89060092563f0dbab9450cbb Mon Sep 17 00:00:00 2001 From: Hans de Goede <hdegoede@xxxxxxxxxx> Date: Thu, 13 Apr 2023 12:09:41 +0200 Subject: power: supply: leds: Fix blink to LED on transition From: Hans de Goede <hdegoede@xxxxxxxxxx> commit e4484643991e0f6b89060092563f0dbab9450cbb upstream. When a battery's status changes from charging to full then the charging-blink-full-solid trigger tries to change the LED from blinking to solid/on. As is documented in include/linux/leds.h to deactivate blinking / to make the LED solid a LED_OFF must be send: """ * Deactivate blinking again when the brightness is set to LED_OFF * via the brightness_set() callback. """ led_set_brighness() calls with a brightness value other then 0 / LED_OFF merely change the brightness of the LED in its on state while it is blinking. So power_supply_update_bat_leds() must first send a LED_OFF event before the LED_FULL to disable blinking. Fixes: 6501f728c56f ("power_supply: Add new LED trigger charging-blink-solid-full") Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> Reviewed-by: Vasily Khoruzhick <anarsoul@xxxxxxxxx> Signed-off-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/power/supply/power_supply_leds.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/power/supply/power_supply_leds.c +++ b/drivers/power/supply/power_supply_leds.c @@ -34,8 +34,9 @@ static void power_supply_update_bat_leds led_trigger_event(psy->charging_full_trig, LED_FULL); led_trigger_event(psy->charging_trig, LED_OFF); led_trigger_event(psy->full_trig, LED_FULL); - led_trigger_event(psy->charging_blink_full_solid_trig, - LED_FULL); + /* Going from blink to LED on requires a LED_OFF event to stop blink */ + led_trigger_event(psy->charging_blink_full_solid_trig, LED_OFF); + led_trigger_event(psy->charging_blink_full_solid_trig, LED_FULL); break; case POWER_SUPPLY_STATUS_CHARGING: led_trigger_event(psy->charging_full_trig, LED_FULL); Patches currently in stable-queue which might be from hdegoede@xxxxxxxxxx are queue-5.10/power-supply-leds-fix-blink-to-led-on-transition.patch queue-5.10/bluetooth-hci_bcm-fall-back-to-getting-bdaddr-from-e.patch queue-5.10/power-supply-bq27xxx-fix-i2c-irq-race-on-remove.patch queue-5.10/power-supply-bq27xxx-fix-bq27xxx_battery_update-race-condition.patch queue-5.10/wifi-iwlwifi-dvm-fix-memcpy-detected-field-spanning-.patch queue-5.10/power-supply-bq27xxx-fix-poll_interval-handling-and-races-on-remove.patch