diff options
author | Jean-Jacques Hiblot <jjhiblot@ti.com> | 2020-09-11 11:13:35 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-09-30 18:55:22 +0300 |
commit | 88e6a60e4aeed2fec059e513572d191ce9387b07 (patch) | |
tree | 8999b75b67b284c0130e1ebd87443801605ac2ac /test/dm/test-fdt.c | |
parent | d4b722e3a85f3a5704501f3a71faa43db1979209 (diff) | |
download | u-boot-88e6a60e4aeed2fec059e513572d191ce9387b07.tar.xz |
test: gpio: Add tests for the managed API
Add a test to verify that GPIOs can be acquired/released using the managed
API. Also check that the GPIOs are released when the consumer device is
removed.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Diffstat (limited to 'test/dm/test-fdt.c')
-rw-r--r-- | test/dm/test-fdt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c index 04802deb7f..26d57f40d1 100644 --- a/test/dm/test-fdt.c +++ b/test/dm/test-fdt.c @@ -251,7 +251,7 @@ int dm_check_devices(struct unit_test_state *uts, int num_devices) /* Test that FDT-based binding works correctly */ static int dm_test_fdt(struct unit_test_state *uts) { - const int num_devices = 8; + const int num_devices = 9; struct udevice *dev; struct uclass *uc; int ret; @@ -473,12 +473,12 @@ static int dm_test_uclass_foreach(struct unit_test_state *uts) count = 0; uclass_id_foreach_dev(UCLASS_TEST_FDT, dev, uc) count++; - ut_asserteq(8, count); + ut_asserteq(9, count); count = 0; uclass_foreach_dev(dev, uc) count++; - ut_asserteq(8, count); + ut_asserteq(9, count); return 0; } |