]> git.dujemihanovic.xyz Git - u-boot.git/commit
led: toggle LED on initial SW blink
authorChristian Marangi <ansuelsmth@gmail.com>
Tue, 1 Oct 2024 12:24:34 +0000 (14:24 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 10 Oct 2024 22:02:20 +0000 (16:02 -0600)
commit9e3d83301e4f34064e09376bb6f2e199f21411de
tree6da6661691ae01bbf832256055c78e74e306bebc
parent136b7b6d2e9837849732c6ade8f4bdaf870ed83a
led: toggle LED on initial SW blink

We currently init the LED OFF when SW blink is triggered when
on_state_change() is called. This can be problematic for very short
period as the ON/OFF blink might never trigger.

Toggle the LED (ON if OFF, OFF if ON) on initial SW blink to handle this
corner case and better display a LED blink from the user.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
drivers/led/led_sw_blink.c