GPIO polarity in bindings for Freescale MXS
Hello,
Maybe I'm missing something but the MXS processors (at least i.MX23 and i.MX28) cannot set the polarity of the GPIOs, so shouldn't the #gpio-cells be 1?
(From Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt):
- #gpio-cells : Should be two. The first cell is the pin number and the second cell is used to specify the gpio polarity:
0 = active high
1 = active low
Regards,
Signature · 1 line
Héctor Palacios
Quoted 6 lines · Hector Palacios
Hello,
Maybe I'm missing something but the MXS processors (at least i.MX23 and i.MX28) cannot set the polarity of the GPIOs, so shouldn't the #gpio-cells be 1?
(From
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt):
Sorry, I meant: from Documentation/devicetree/bindings/gpio/gpio-mxs.txt
Quoted 7 lines
- #gpio-cells : Should be two. The first cell is the pin number and the second cell is used to specify the gpio polarity:
0 = active high
1 = active lowRegards,
Quoted 6 lines · Hector Palacios
Hello,
Maybe I'm missing something but the MXS processors (at least i.MX23 and i.MX28) cannot set the polarity of the GPIOs, so shouldn't the #gpio-cells be 1?
Quoted 6 lines
(From
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt):- #gpio-cells : Should be two. The first cell is the pin number and the second cell is used to specify the gpio polarity:
0 = active high
1 = active low
This field describes how software should interpret the GPIO values.
So, if the GPIO is specified as active-high, then software will gpio_set_value(the_value_it_wants), whereas if the GPIO is specified as active-low, then software will gpio_set_value(!the_value_it_wants). Note that "software" here refers to the driver that requests/uses the GPIO, and the flags can be retrieve using of_get_gpio_flags().
Quoted 15 lines · Hector Palacios
Quoted 6 lines · Hector Palacios
Hello,
Maybe I'm missing something but the MXS processors (at least i.MX23 and i.MX28) cannot set the polarity of the GPIOs, so shouldn't the #gpio-cells be 1?
(From
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt):Sorry, I meant: from
Documentation/devicetree/bindings/gpio/gpio-mxs.txtQuoted 5 lines
- #gpio-cells : Should be two. The first cell is the pin number and the second cell is used to specify the gpio polarity:
0 = active high
1 = active low
The second cell is used by client devices to specify their gpio connection polarity. Check of_get_named_gpio_flags() in drivers/mmc/host/mxs-mmc.c for example to see how it's used.
Shawn