From: Marek Vasut Date: Mon, 25 Apr 2022 16:33:51 +0000 (+0200) Subject: test: dm: pinmux: Get LED2 udevice in the pinmux test X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=891ec35a7a428c0c08c95ed5686bc1cd10e0c4dd;p=u-boot.git test: dm: pinmux: Get LED2 udevice in the pinmux test The UT reinitializes the pin controller state, get LED2 udevice to trigger its probe and configure the pin controller pin state as it is expected by the test. Signed-off-by: Marek Vasut Cc: Patrice Chotard Cc: Patrick Delaunay Cc: Sean Anderson Cc: Simon Glass Cc: Steven Lawrance --- diff --git a/test/cmd/pinmux.c b/test/cmd/pinmux.c index de3bb0d2f9..df40bb7743 100644 --- a/test/cmd/pinmux.c +++ b/test/cmd/pinmux.c @@ -7,12 +7,17 @@ #include #include +#include #include #include #include static int dm_test_cmd_pinmux_status_pinname(struct unit_test_state *uts) { + struct udevice *dev; + + ut_assertok(uclass_get_device(UCLASS_LED, 2, &dev)); + /* Test that 'pinmux status ' displays the selected pin. */ console_record_reset(); run_command("pinmux status a5", 0);