aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2020-05-22 11:08:58 +0200
committerTom Rini <trini@konsulko.com>2020-07-05 08:06:09 -0400
commit9ba84329dc45f28f8581e95de155b5bf0373bb3d (patch)
tree7a276566b545e1a8df7f2113d67baaace3c5b2e8 /arch/sandbox
parentcd2faeba1abc08e5adba736e75dc665742cc310c (diff)
downloadu-boot-9ba84329dc45f28f8581e95de155b5bf0373bb3d.zip
u-boot-9ba84329dc45f28f8581e95de155b5bf0373bb3d.tar.gz
u-boot-9ba84329dc45f28f8581e95de155b5bf0373bb3d.tar.bz2
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.dts20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 5ce5e28..24bb3ce 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 {