mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
sandbox: led: use new function to configure default state
Initialize the led with the default state defined in device tree in board_init and solve issue with test for led default state. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
This commit is contained in:
committed by
Tom Rini
parent
1f5118b4d3
commit
17585e2dc3
@@ -32,6 +32,9 @@ static int dm_test_led_default_state(struct unit_test_state *uts)
|
||||
{
|
||||
struct udevice *dev;
|
||||
|
||||
/* configure the default state (auto-probe) */
|
||||
led_default_state();
|
||||
|
||||
/* Check that we handle the default-state property correctly. */
|
||||
ut_assertok(led_get_by_label("sandbox:default_on", &dev));
|
||||
ut_asserteq(LEDST_ON, led_get_state(dev));
|
||||
|
||||
Reference in New Issue
Block a user