diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2018-07-27 16:37:09 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-08-10 10:27:32 -0400 |
commit | 17585e2dc33c23b3ea37daf485ced880c8fea3f8 (patch) | |
tree | ae4705a14fb2f48d7d2cc5d4ae05ffd506c3a393 /test/dm | |
parent | 1f5118b4d38d9caaab4c451f974542297bd1e2a7 (diff) |
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>
Diffstat (limited to 'test/dm')
-rw-r--r-- | test/dm/led.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/dm/led.c b/test/dm/led.c index 0071f216bb7..00de7b3997c 100644 --- a/test/dm/led.c +++ b/test/dm/led.c @@ -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)); |