aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
index f7a158d85862..5788d5cf1252 100644
--- a/Documentation/devicetree/bindings/gpio/gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio.txt
@@ -116,6 +116,29 @@ Every GPIO controller node must contain both an empty "gpio-controller"
116property, and a #gpio-cells integer property, which indicates the number of 116property, and a #gpio-cells integer property, which indicates the number of
117cells in a gpio-specifier. 117cells in a gpio-specifier.
118 118
119The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism
120providing automatic GPIO request and configuration as part of the
121gpio-controller's driver probe function.
122
123Each GPIO hog definition is represented as a child node of the GPIO controller.
124Required properties:
125- gpio-hog: A property specifying that this child node represent a GPIO hog.
126- gpios: Store the GPIO information (id, flags, ...). Shall contain the
127 number of cells specified in its parent node (GPIO controller
128 node).
129Only one of the following properties scanned in the order shown below.
130This means that when multiple properties are present they will be searched
131in the order presented below and the first match is taken as the intended
132configuration.
133- input: A property specifying to set the GPIO direction as input.
134- output-low A property specifying to set the GPIO direction as output with
135 the value low.
136- output-high A property specifying to set the GPIO direction as output with
137 the value high.
138
139Optional properties:
140- line-name: The GPIO label name. If not present the node name is used.
141
119Example of two SOC GPIO banks defined as gpio-controller nodes: 142Example of two SOC GPIO banks defined as gpio-controller nodes:
120 143
121 qe_pio_a: gpio-controller@1400 { 144 qe_pio_a: gpio-controller@1400 {
@@ -123,6 +146,13 @@ Example of two SOC GPIO banks defined as gpio-controller nodes:
123 reg = <0x1400 0x18>; 146 reg = <0x1400 0x18>;
124 gpio-controller; 147 gpio-controller;
125 #gpio-cells = <2>; 148 #gpio-cells = <2>;
149
150 line_b {
151 gpio-hog;
152 gpios = <6 0>;
153 output-low;
154 line-name = "foo-bar-gpio";
155 };
126 }; 156 };
127 157
128 qe_pio_e: gpio-controller@1460 { 158 qe_pio_e: gpio-controller@1460 {