aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Parrot <bparrot@ti.com>2015-02-02 12:44:45 -0500
committerLinus Walleij <linus.walleij@linaro.org>2015-03-04 05:10:32 -0500
commit6b516a1093006a39368dd11a5396be5bb00c99df (patch)
tree418c460e8c380766b6bb7d08eb4c9fbf33691267
parentf625d4601759f1cf1fd3ae58abeb0e203b8993b1 (diff)
gpio: Document GPIO hogging mechanism
Add GPIO hogging documentation to gpio.txt Signed-off-by: Benoit Parrot <bparrot@ti.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-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 {