Skip to contentSkip to conversation

dt-bindings: pinctrl: mcp23s08: Clarify gpiospec flags cell usage

PATCH In review Ricardo Silva 3 participants 3 messages Apr 11, 2018 – Apr 26, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: pinctrl: mcp23s08: Clarify gpiospec flags cell usage

The pinctrl-mcp23s08 driver doesn't provide a specific gpiospec of_xlate() function, causing the gpiolib-of's of_gpio_simple_xlate() function to be used instead, which takes the gpiospec's second cell as the flags specifier according to 'include/dt-bindings/gpio/gpio.h'.

The pinctrl-mcp23s08 bindings document was mentioning that the flags were unused, which is not accurate because values in that second cell are indeed used by the gpiolib-of's of_gpio_simple_xlate() for configuring the gpio (e.g. its polarity).

This way, replace the "flags currently unused" reference in the dt-bindings document with references to the appropriate files specifying the possible flag values and gpiospec description.

---
 .../devicetree/bindings/pinctrl/pinctrl-mcp23s08.txt          | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/pinctrl/pinctrl-mcp23s08.txt +3 -1
index 9c451c20dda4..c357c99c948f 100644
@@ -18,7 +18,9 @@ Required properties:
     removed.
 - #gpio-cells : Should be two.
   - first cell is the pin number
-  - second cell is used to specify flags. Flags are currently unused.
+  - second cell is used to specify flags as described in
+    'Documentation/devicetree/bindings/gpio/gpio.txt'. Allowed values defined by
+    'include/dt-bindings/gpio/gpio.h' (e.g. GPIO_ACTIVE_LOW).
 - gpio-controller : Marks the device node as a GPIO controller.
 - reg : For an address on its bus. I2C uses this a the I2C address of the chip.
         SPI uses this to specify the chipselect line which the chip is
Signature · 1 line
2.17.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Ricardo Silva

The pinctrl-mcp23s08 driver doesn't provide a specific gpiospec of_xlate() function, causing the gpiolib-of's of_gpio_simple_xlate() function to be used instead, which takes the gpiospec's second cell as the flags specifier according to 'include/dt-bindings/gpio/gpio.h'.

The pinctrl-mcp23s08 bindings document was mentioning that the flags were unused, which is not accurate because values in that second cell are indeed used by the gpiolib-of's of_gpio_simple_xlate() for configuring the gpio (e.g. its polarity).

This way, replace the "flags currently unused" reference in the dt-bindings document with references to the appropriate files specifying the possible flag values and gpiospec description.

Quoted 5 lines
---
 .../devicetree/bindings/pinctrl/pinctrl-mcp23s08.txt          | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
#2 lore raw
In reply to Ricardo Silva
Quoted 10 lines · Ricardo Silva

The pinctrl-mcp23s08 driver doesn't provide a specific gpiospec of_xlate() function, causing the gpiolib-of's of_gpio_simple_xlate() function to be used instead, which takes the gpiospec's second cell as the flags specifier according to 'include/dt-bindings/gpio/gpio.h'.

The pinctrl-mcp23s08 bindings document was mentioning that the flags were unused, which is not accurate because values in that second cell are indeed used by the gpiolib-of's of_gpio_simple_xlate() for configuring the gpio (e.g. its polarity).

Quoted 6 lines

This way, replace the "flags currently unused" reference in the dt-bindings document with references to the appropriate files specifying the possible flag values and gpiospec description.

Patch applied with Rob's review tag.

Yours,
Linus Walleij