doc: Add gpio status output fields description
authorPatrice Chotard <patrice.chotard@foss.st.com>
Tue, 30 Aug 2022 14:56:28 +0000 (16:56 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 1 Sep 2022 05:21:25 +0000 (07:21 +0200)
Add gpio status output fields description and one output example.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tweak the formatting.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
doc/usage/cmd/gpio.rst

index f6a5668..ee90213 100644 (file)
@@ -45,6 +45,31 @@ gpio status
 
 Display the status of one or multiple GPIOs. By default only claimed GPIOs
 are displayed.
+gpio status command output fields are::
+
+    <name>: <function>: <value> [x] <label>
+
+*function* can take the following values:
+
+output
+    pin configured in gpio output, *value* indicates the pin's level
+
+input
+    pin configured in gpio input, *value* indicates the pin's level
+
+func
+    pin configured in alternate function, followed by *label*
+    which shows pinmuxing label.
+
+unused
+    pin not configured
+
+*[x]* or *[ ]* indicate respectively if the gpio is used or not.
+
+*label* shows the gpio label.
+
+Parameters
+----------
 
 -a
     Display GPIOs irrespective of being claimed.
@@ -77,6 +102,23 @@ Switch the status of a GPIO::
     => echo $myvar
     0
 
+Show the GPIO status::
+
+    => gpio status
+    Bank GPIOA:
+    GPIOA1: func rgmii-0
+    GPIOA2: func rgmii-0
+    GPIOA7: func rgmii-0
+    GPIOA10: output: 0 [x] hdmi-transmitter@39.reset-gpios
+    GPIOA13: output: 1 [x] red.gpios
+
+    Bank GPIOB:
+    GPIOB0: func rgmii-0
+    GPIOB1: func rgmii-0
+    GPIOB2: func uart4-0
+    GPIOB7: input: 0 [x] mmc@58005000.cd-gpios
+    GPIOB11: func rgmii-0
+
 Configuration
 -------------