All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] doc: Add gpio status output fields description
@ 2022-08-30 14:56 Patrice Chotard
  2022-08-30 15:56 ` Simon Glass
  0 siblings, 1 reply; 2+ messages in thread
From: Patrice Chotard @ 2022-08-30 14:56 UTC (permalink / raw)
  To: u-boot
  Cc: Patrice CHOTARD, Patrick DELAUNAY, U-Boot STM32, Heinrich Schuchardt

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(+)

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
 -------------
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] doc: Add gpio status output fields description
  2022-08-30 14:56 [PATCH] doc: Add gpio status output fields description Patrice Chotard
@ 2022-08-30 15:56 ` Simon Glass
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2022-08-30 15:56 UTC (permalink / raw)
  To: Patrice Chotard
  Cc: U-Boot Mailing List, Patrick DELAUNAY, U-Boot STM32, Heinrich Schuchardt

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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-30 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30 14:56 [PATCH] doc: Add gpio status output fields description Patrice Chotard
2022-08-30 15:56 ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.