diff options
Diffstat (limited to 'Documentation/devicetree/bindings/gpio/gpio.txt')
-rw-r--r-- | Documentation/devicetree/bindings/gpio/gpio.txt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt index d933af370697..dc90b0559269 100644 --- a/Documentation/devicetree/bindings/gpio/gpio.txt +++ b/Documentation/devicetree/bindings/gpio/gpio.txt @@ -53,6 +53,40 @@ Example of the node using GPIOs: In this example gpio-specifier is "18 0" and encodes GPIO pin number, and empty GPIO flags as accepted by the "qe_pio_e" gpio-controller. +1.1) Default initialisation of GPIOs: +----------------------------------- +The GPIOs can be set as input or output-low or output-high during +GPIO registration with gpiolib. +The two properties are provided with this +- gpio-init-names: The state names of the GPIO initialisation. +- gpio-init-0: The state 0 node handle for GPIO initialisation. + : +- gpio-init-n: The state n node handle for GPIO initialisation. + +The subnode property: +-------------------- +The subnode should have following properties with the list of GPIOs number +belongs to that device. +- gpio-input: The list of GPIOs to be set as input. +- gpio-output-low: The list of GPIOs to be set as output with low output. +- gpio-output-high: The list of GPIOs to be set as output with high output. + +Example: + gpio: gpio@6000d000 { + gpio-init-names = "default"; + gpio-init-0 = <&gpio_default>; + + gpio_default: default { + gpio-input = <189 190 178 179>; + gpio-output-low = <188 191>; + gpio-output-high = <149 138>; + }; + }; + +Here GPIO driver will have one state "default" and with this, the GPIOs +189, 190, 178, 179 are set as input, 188 and 191 are set as output low and +GPIOs 149 and 138 are set as GPIO output-high. + 2) gpio-controller nodes ------------------------ |