LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] dt-bindings: pinctrl: mcp23s08: Clarify gpiospec flags cell usage
@ 2018-04-11 21:42 Ricardo Silva
  2018-04-16 18:50 ` Rob Herring
  2018-04-26 22:48 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Ricardo Silva @ 2018-04-11 21:42 UTC (permalink / raw)
  To: devicetree
  Cc: Linus Walleij, Rob Herring, Mark Rutland, linux-gpio,
	linux-kernel, 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.

CC: devicetree@vger.kernel.org
Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
---
 .../devicetree/bindings/pinctrl/pinctrl-mcp23s08.txt          | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mcp23s08.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-mcp23s08.txt
index 9c451c20dda4..c357c99c948f 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-mcp23s08.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mcp23s08.txt
@@ -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
-- 
2.17.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: pinctrl: mcp23s08: Clarify gpiospec flags cell usage
  2018-04-11 21:42 [PATCH] dt-bindings: pinctrl: mcp23s08: Clarify gpiospec flags cell usage Ricardo Silva
@ 2018-04-16 18:50 ` Rob Herring
  2018-04-26 22:48 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2018-04-16 18:50 UTC (permalink / raw)
  To: Ricardo Silva
  Cc: devicetree, Linus Walleij, Mark Rutland, linux-gpio, linux-kernel

On Wed, Apr 11, 2018 at 10:42:57PM +0100, Ricardo Silva wrote:
> 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.
> 
> CC: devicetree@vger.kernel.org
> Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
> ---
>  .../devicetree/bindings/pinctrl/pinctrl-mcp23s08.txt          | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: pinctrl: mcp23s08: Clarify gpiospec flags cell usage
  2018-04-11 21:42 [PATCH] dt-bindings: pinctrl: mcp23s08: Clarify gpiospec flags cell usage Ricardo Silva
  2018-04-16 18:50 ` Rob Herring
@ 2018-04-26 22:48 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2018-04-26 22:48 UTC (permalink / raw)
  To: Ricardo Silva
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Rob Herring, Mark Rutland, open list:GPIO SUBSYSTEM,
	linux-kernel

On Wed, Apr 11, 2018 at 11:42 PM, Ricardo Silva <rjpdasilva@gmail.com> wrote:

> 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.
>
> CC: devicetree@vger.kernel.org
> Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>

Patch applied with Rob's review tag.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-26 22:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-11 21:42 [PATCH] dt-bindings: pinctrl: mcp23s08: Clarify gpiospec flags cell usage Ricardo Silva
2018-04-16 18:50 ` Rob Herring
2018-04-26 22:48 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).