Skip to contentSkip to conversation

bindings: update imx and mxs #gpio-cells

PATCH New Shawn Guo 2 participants 3 messages Jun 28, 2012 – Jul 6, 2012

Subsystems (3)
lore
Share & tools
lore

Shawn Guo

author
#0 lore raw

PATCH 1/1 bindings: update imx and mxs #gpio-cells

The of_get_named_gpio_flags can retrieve the second cell of gpio-specifier as the "flags". The imx and mxs gpio driver do not have their own .xlate callback, which means of_gpio_simple_xlate is used and it's a 1:1 mapping between gpio controller flags and Linux "enum of_gpio_flags".

Update imx and mxs bindings document to make it clear.

---
 .../devicetree/bindings/gpio/fsl-imx-gpio.txt      |    5 +++--
 .../devicetree/bindings/gpio/gpio-mxs.txt          |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt +3 -2
index 4363ae4..5f360e7 100644
@@ -8,8 +8,9 @@ Required properties:
   by low 16 pins and the second one is for high 16 pins.
 - gpio-controller : Marks the device node as a gpio controller.
 - #gpio-cells : Should be two.  The first cell is the pin number and
-  the second cell is used to specify optional parameters (currently
-  unused).
+  the second cell is used to specify the gpio polarity:
+      0 = active high
+      1 = active low
 
 Example:
 
Documentation/devicetree/bindings/gpio/gpio-mxs.txt +3 -2
index 0c35673..1e677a4 100644
@@ -13,8 +13,9 @@ Required properties for GPIO node:
 - interrupts : Should be the port interrupt shared by all 32 pins.
 - gpio-controller : Marks the device node as a gpio controller.
 - #gpio-cells : Should be two.  The first cell is the pin number and
-  the second cell is used to specify optional parameters (currently
-  unused).
+  the second cell is used to specify the gpio polarity:
+      0 = active high
+      1 = active low
 - interrupt-controller: Marks the device node as an interrupt controller.
 - #interrupt-cells : Should be 2.  The first cell is the GPIO number.
   The second cell bits[3:0] is used to specify trigger type and level flags:
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 bindings: update imx and mxs #gpio-cells

Quoted 19 lines · Shawn Guo

The of_get_named_gpio_flags can retrieve the second cell of gpio-specifier as the "flags". The imx and mxs gpio driver do not have their own .xlate callback, which means of_gpio_simple_xlate is used and it's a 1:1 mapping between gpio controller flags and Linux "enum of_gpio_flags".

Update imx and mxs bindings document to make it clear.

---
 .../devicetree/bindings/gpio/fsl-imx-gpio.txt      |    5 +++--
 .../devicetree/bindings/gpio/gpio-mxs.txt          |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt +0 -0
index 4363ae4..5f360e7 100644

Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt Required properties: · line 14

Quoted 9 lines
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt +3 -2
@@ -8,8 +8,9 @@ Required properties:
   by low 16 pins and the second one is for high 16 pins.
 - gpio-controller : Marks the device node as a gpio controller.
 - #gpio-cells : Should be two.  The first cell is the pin number and
-  the second cell is used to specify optional parameters (currently
-  unused).
+  the second cell is used to specify the gpio polarity:
+      0 = active high
+      1 = active low
 

Agree with this design, looks good to me.

Regards,
Hui.

Quoted 20 lines
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt +0 -0
 Example:
 
Documentation/devicetree/bindings/gpio/gpio-mxs.txt +3 -2
index 0c35673..1e677a4 100644
@@ -13,8 +13,9 @@ Required properties for GPIO node:
 - interrupts : Should be the port interrupt shared by all 32 pins.
 - gpio-controller : Marks the device node as a gpio controller.
 - #gpio-cells : Should be two.  The first cell is the pin number and
-  the second cell is used to specify optional parameters (currently
-  unused).
+  the second cell is used to specify the gpio polarity:
+      0 = active high
+      1 = active low
 - interrupt-controller: Marks the device node as an interrupt controller.
 - #interrupt-cells : Should be 2.  The first cell is the GPIO number.
   The second cell bits[3:0] is used to specify trigger type and level flags:
author Applied
#2 lore raw

PATCH 1/1 bindings: update imx and mxs #gpio-cells

In reply to Shawn Guo
Quoted 9 lines · Shawn Guo

The of_get_named_gpio_flags can retrieve the second cell of gpio-specifier as the "flags". The imx and mxs gpio driver do not have their own .xlate callback, which means of_gpio_simple_xlate is used and it's a 1:1 mapping between gpio controller flags and Linux "enum of_gpio_flags".

Update imx and mxs bindings document to make it clear.

Queued on imx/dt tree.

Regards,
Shawn