linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] gpio: mention in DT binding doc that <name>-gpio is deprecated
@ 2015-09-21 12:57 Javier Martinez Canillas
       [not found] ` <1442840245-7982-1-git-send-email-javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Javier Martinez Canillas @ 2015-09-21 12:57 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-gpio, Linus Walleij, Alexandre Courbot, devicetree,
	Javier Martinez Canillas, Mika Westerberg, Arnd Bergmann,
	Benoit Parrot, Kumar Gala, Masahiro Yamada, Ian Campbell,
	Rob Herring, Pawel Moll, Mark Rutland

The gpiolib supports parsing DT properties of the form <name>-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 this clear in the GPIO DT binding doc.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

Changes in v2:
- Explain that <name>-gpio is deprecated instead of saying that is
  supported. Suggested by Alexandre Courbot.

 Documentation/devicetree/bindings/gpio/gpio.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
index 5788d5cf1252..82d40e2505f6 100644
--- a/Documentation/devicetree/bindings/gpio/gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio.txt
@@ -16,7 +16,9 @@ properties, each containing a 'gpio-list':
 GPIO properties should be named "[<name>-]gpios", with <name> being the purpose
 of this GPIO for the device. While a non-existent <name> is considered valid
 for compatibility reasons (resolving to the "gpios" property), it is not allowed
-for new bindings.
+for new bindings. Also, GPIO properties named "[<name>-]gpio" are 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.
 
 GPIO properties can contain one or more GPIO phandles, but only in exceptional
 cases should they contain more than one. If your device uses several GPIOs with
-- 
2.4.3


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

* Re: [PATCH v2] gpio: mention in DT binding doc that <name>-gpio is deprecated
       [not found] ` <1442840245-7982-1-git-send-email-javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
@ 2015-09-25 18:32   ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2015-09-25 18:32 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linus Walleij,
	Alexandre Courbot,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Mika Westerberg, Arnd Bergmann, Benoit Parrot, Kumar Gala,
	Masahiro Yamada, Ian Campbell, Rob Herring, Pawel Moll,
	Mark Rutland

On Mon, Sep 21, 2015 at 7:57 AM, Javier Martinez Canillas
<javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> wrote:
> The gpiolib supports parsing DT properties of the form <name>-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 this clear in the GPIO DT binding doc.
>
> Signed-off-by: Javier Martinez Canillas <javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>

Applied. Thanks.

Rob

>
> ---
>
> Changes in v2:
> - Explain that <name>-gpio is deprecated instead of saying that is
>   supported. Suggested by Alexandre Courbot.
>
>  Documentation/devicetree/bindings/gpio/gpio.txt | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
> index 5788d5cf1252..82d40e2505f6 100644
> --- a/Documentation/devicetree/bindings/gpio/gpio.txt
> +++ b/Documentation/devicetree/bindings/gpio/gpio.txt
> @@ -16,7 +16,9 @@ properties, each containing a 'gpio-list':
>  GPIO properties should be named "[<name>-]gpios", with <name> being the purpose
>  of this GPIO for the device. While a non-existent <name> is considered valid
>  for compatibility reasons (resolving to the "gpios" property), it is not allowed
> -for new bindings.
> +for new bindings. Also, GPIO properties named "[<name>-]gpio" are 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.
>
>  GPIO properties can contain one or more GPIO phandles, but only in exceptional
>  cases should they contain more than one. If your device uses several GPIOs with
> --
> 2.4.3
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-09-25 18:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-21 12:57 [PATCH v2] gpio: mention in DT binding doc that <name>-gpio is deprecated Javier Martinez Canillas
     [not found] ` <1442840245-7982-1-git-send-email-javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
2015-09-25 18:32   ` Rob Herring

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).