* [PATCH] Documentation: gpio: mention that <function>-gpio has been deprecated
@ 2015-09-21 13:14 Javier Martinez Canillas
2015-09-24 21:56 ` Jonathan Corbet
2015-10-02 11:13 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Javier Martinez Canillas @ 2015-09-21 13:14 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, linux-doc, Linus Walleij,
Jonathan Corbet, linux-gpio, Alexandre Courbot
The gpiolib supports parsing DT properties of the form <function>-gpio
but it was only added for compatibility with older DT bindings that got
it wrong and should not be used in newer bindings.
The commit that added support for this was:
dd34c37aa3e8 ("gpio: of: Allow -gpio suffix for property names")
but didn't update the documentation to explain this so it's been a source
of confusion. So let's make clear this in the GPIO documentation.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
Documentation/gpio/board.txt | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/Documentation/gpio/board.txt b/Documentation/gpio/board.txt
index f59c43b6411b..3092178628c4 100644
--- a/Documentation/gpio/board.txt
+++ b/Documentation/gpio/board.txt
@@ -21,8 +21,8 @@ exact way to do it depends on the GPIO controller providing the GPIOs, see the
device tree bindings for your controller.
GPIOs mappings are defined in the consumer device's node, in a property named
-either <function>-gpios or <function>-gpio, where <function> is the function
-the driver will request through gpiod_get(). For example:
+<function>-gpios, where <function> is the function the driver will request
+through gpiod_get(). For example:
foo_device {
compatible = "acme,foo";
@@ -31,9 +31,13 @@ the driver will request through gpiod_get(). For example:
<&gpio 16 GPIO_ACTIVE_HIGH>, /* green */
<&gpio 17 GPIO_ACTIVE_HIGH>; /* blue */
- power-gpio = <&gpio 1 GPIO_ACTIVE_LOW>;
+ power-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
};
+Properties named <function>-gpio are also considered valid and old bindings use
+it but are only supported for compatibility reasons and should not be used for
+newer bindings since it has been deprecated.
+
This property will make GPIOs 15, 16 and 17 available to the driver under the
"led" function, and GPIO 1 as the "power" GPIO:
--
2.4.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Documentation: gpio: mention that <function>-gpio has been deprecated
2015-09-21 13:14 [PATCH] Documentation: gpio: mention that <function>-gpio has been deprecated Javier Martinez Canillas
@ 2015-09-24 21:56 ` Jonathan Corbet
2015-10-02 11:13 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2015-09-24 21:56 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, linux-doc, Linus Walleij, linux-gpio,
Alexandre Courbot
On Mon, 21 Sep 2015 15:14:46 +0200
Javier Martinez Canillas <javier@osg.samsung.com> wrote:
> The gpiolib supports parsing DT properties of the form <function>-gpio
> but it was only added for compatibility with older DT bindings that got
> it wrong and should not be used in newer bindings.
>
> The commit that added support for this was:
>
> dd34c37aa3e8 ("gpio: of: Allow -gpio suffix for property names")
>
> but didn't update the documentation to explain this so it's been a source
> of confusion. So let's make clear this in the GPIO documentation.
Applied to the docs tree, thanks.
jon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Documentation: gpio: mention that <function>-gpio has been deprecated
2015-09-21 13:14 [PATCH] Documentation: gpio: mention that <function>-gpio has been deprecated Javier Martinez Canillas
2015-09-24 21:56 ` Jonathan Corbet
@ 2015-10-02 11:13 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2015-10-02 11:13 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
Jonathan Corbet, linux-gpio@vger.kernel.org, Alexandre Courbot
On Mon, Sep 21, 2015 at 6:14 AM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> The gpiolib supports parsing DT properties of the form <function>-gpio
> but it was only added for compatibility with older DT bindings that got
> it wrong and should not be used in newer bindings.
>
> The commit that added support for this was:
>
> dd34c37aa3e8 ("gpio: of: Allow -gpio suffix for property names")
>
> but didn't update the documentation to explain this so it's been a source
> of confusion. So let's make clear this in the GPIO documentation.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by, saw that Jon took the patch, thx.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-02 11:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-21 13:14 [PATCH] Documentation: gpio: mention that <function>-gpio has been deprecated Javier Martinez Canillas
2015-09-24 21:56 ` Jonathan Corbet
2015-10-02 11:13 ` 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).