Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 76931edd authored by Stas Sergeev's avatar Stas Sergeev Committed by Bryan Wu
Browse files

leds: fix brightness changing when software blinking is active



The following sequence:
echo timer >/sys/class/leds/<name>/trigger
echo 1 >/sys/class/leds/<name>/brightness
should change the ON brightness for blinking.
The function led_set_brightness() was mistakenly initiating the
delayed blink stop procedure, which resulted in no blinking with
the timer trigger still active.

This patch fixes the problem by changing led_set_brightness()
to not initiate the delayed blink stop when brightness is not 0.

CC: Richard Purdie <rpurdie@rpsys.net>
CC: Kyungmin Park <kyungmin.park@samsung.com>
CC: linux-leds@vger.kernel.org
CC: linux-kernel@vger.kernel.org

Acked-by: default avatarJacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: default avatarStas Sergeev <stsp@users.sourceforge.net>
Signed-off-by: default avatarBryan Wu <cooloney@gmail.com>
parent 7ff6b232
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment