diff mbox series

doc: Add gpio status output fields description

Message ID 20220830145628.2386366-1-patrice.chotard@foss.st.com
State Accepted, archived
Delegated to: Heinrich Schuchardt
Headers show
Series doc: Add gpio status output fields description | expand

Commit Message

Patrice CHOTARD Aug. 30, 2022, 2:56 p.m. UTC
Add gpio status output fields description and one output example.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
---

 doc/usage/cmd/gpio.rst | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

Comments

Simon Glass Aug. 30, 2022, 3:56 p.m. UTC | #1
On Tue, 30 Aug 2022 at 08:56, Patrice Chotard
<patrice.chotard@foss.st.com> wrote:
>
> Add gpio status output fields description and one output example.
>
> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>
>  doc/usage/cmd/gpio.rst | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/doc/usage/cmd/gpio.rst b/doc/usage/cmd/gpio.rst
index f6a5668388..b768b08a9b 100644
--- a/doc/usage/cmd/gpio.rst
+++ b/doc/usage/cmd/gpio.rst
@@ -45,6 +45,17 @@  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 be:
+  - "output" : pin configured in gpio output.
+  - "input"  : pin configured in gpio input.
+  - "func"   : pin configured in alternate function, followed by [label]
+     which shows pinmuxing label.
+  - "unused" : pin not configured.
+
+For [function] "output" or "input", [value] field indicates pin's level,
+[x] or [ ] indicates respectively if gpio is used or not, [label] shows gpio label.
 
 -a
     Display GPIOs irrespective of being claimed.
@@ -77,6 +88,21 @@  Switch the status of a GPIO::
     => echo $myvar
     0
 
+    => 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
 -------------