From: Patrice Chotard <patrice.chotard@foss.st.com> Date: Tue, 30 Aug 2022 14:56:28 +0000 (+0200) Subject: doc: Add gpio status output fields description X-Git-Tag: v2025.01-rc5-pxa1908~1298^2~4 X-Git-Url: http://git.dujemihanovic.xyz/img/static/html/%7B%7B%20.RelPermalink%20%7D%7D?a=commitdiff_plain;h=00cc81f4e4c3d7e28766a770a09ce888c7ff5bb5;p=u-boot.git doc: Add gpio status output fields description 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> --- diff --git a/doc/usage/cmd/gpio.rst b/doc/usage/cmd/gpio.rst index f6a5668388..ee902138f1 100644 --- a/doc/usage/cmd/gpio.rst +++ b/doc/usage/cmd/gpio.rst @@ -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 -------------