diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/dm/gpio.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/dm/gpio.c b/test/dm/gpio.c index 34a5d1a974e..0fb05b5ca06 100644 --- a/test/dm/gpio.c +++ b/test/dm/gpio.c @@ -143,6 +143,17 @@ static int dm_test_gpio(struct unit_test_state *uts) ut_assert(gpio_lookup_name("hog_not_exist", &dev, &offset, &gpio)); + /* Check if lookup for gpio-line-names work */ + ut_assertok(gpio_lookup_name("factory-reset", &dev, &offset, &gpio)); + ut_asserteq_str(dev->name, "extra-gpios"); + ut_asserteq(0, offset); + ut_asserteq(CONFIG_SANDBOX_GPIO_COUNT + 25 + 0, gpio); + + ut_assertok(gpio_lookup_name("rtc-irq", &dev, &offset, &gpio)); + ut_asserteq_str(dev->name, "base-gpios"); + ut_asserteq(2, offset); + ut_asserteq(CONFIG_SANDBOX_GPIO_COUNT + 2, gpio); + return 0; } DM_TEST(dm_test_gpio, UTF_SCAN_PDATA | UTF_SCAN_FDT); |
