Commit a13b2634 authored by Sven Schwermer's avatar Sven Schwermer Committed by Greg Kroah-Hartman
Browse files

leds: multicolor: Fix intensity setting while SW blinking



[ Upstream commit e35ca991 ]

When writing to the multi_intensity file, don't unconditionally call
led_set_brightness. By only doing this if blinking is inactive we
prevent blinking from stopping if the blinking is in its off phase while
the file is written.

Instead, if blinking is active, the changed intensity values are applied
upon the next blink. This is consistent with changing the brightness on
monochrome LEDs with active blinking.

Suggested-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
Acked-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Reviewed-by: default avatarTobias Deiminger <tobias.deiminger@linutronix.de>
Tested-by: default avatarSven Schuchmann <schuchmann@schleissheimer.de>
Signed-off-by: default avatarSven Schwermer <sven.schwermer@disruptive-technologies.com>
Link: https://lore.kernel.org/r/20250404184043.227116-1-sven@svenschwermer.de


Signed-off-by: default avatarLee Jones <lee@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c3616dfd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment