diff options
author | Heiko Schocher <hs@denx.de> | 2020-05-22 11:08:58 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-05 08:06:09 -0400 |
commit | 9ba84329dc45f28f8581e95de155b5bf0373bb3d (patch) | |
tree | 7a276566b545e1a8df7f2113d67baaace3c5b2e8 /arch/sandbox | |
parent | cd2faeba1abc08e5adba736e75dc665742cc310c (diff) | |
download | u-boot-9ba84329dc45f28f8581e95de155b5bf0373bb3d.tar.gz |
sandbox, test: add test for GPIO_HOG function
currently gpio hog function is not tested with "ut dm gpio"
so add some basic tests for gpio hog functionality.
For this enable GPIO_HOG in sandbox_defconfig, add
in DTS some gpio hog entries, and add testcase in
"ut dm gpio" command.
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/dts/test.dts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 5ce5e28476..24bb3ce36f 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -343,6 +343,26 @@ #gpio-cells = <1>; gpio-bank-name = "a"; sandbox,gpio-count = <20>; + hog_input_active_low { + gpio-hog; + input; + gpios = <0 GPIO_ACTIVE_LOW>; + }; + hog_input_active_high { + gpio-hog; + input; + gpios = <1 GPIO_ACTIVE_HIGH>; + }; + hog_output_low { + gpio-hog; + output-low; + gpios = <2 GPIO_ACTIVE_HIGH>; + }; + hog_output_high { + gpio-hog; + output-high; + gpios = <3 GPIO_ACTIVE_HIGH>; + }; }; gpio_b: extra-gpios { |