All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andrew F. Davis" <afd@ti.com>
To: "Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Sascha Hauer" <kernel@pengutronix.de>
Cc: <alsa-devel@alsa-project.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, "Andrew F . Davis" <afd@ti.com>
Subject: [PATCH v2 2/8] ASoC: tlv320aic3x: Fix typo in DT binding documentation
Date: Wed, 29 Nov 2017 11:13:53 -0600	[thread overview]
Message-ID: <20171129171359.29382-3-afd@ti.com> (raw)
In-Reply-To: <20171129171359.29382-1-afd@ti.com>

The property used to specify a GPIO intended for reset is "reset-gpios",
this binding uses "gpio-reset", as almost all other bindings use the
former name this use of the latter was certainly not intended. It is not
compatible with newer methods used to fetch GPIO pins and to prevent the
spread of this error to other bindings lets fix this here.

We also standardize the pin as active-low, different device trees have
marked the GPIO different ways, luckily the driver currently uses the
low-level GPIO set function which does not respect the active-low flag,
but future changes may change this. This is an active-low reset, mark
it as such.

Lastly, add an example of use for this property.

Fixes: c24fdc886fde ("ASoC: tlv320aic3x: Add device tree bindings")

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 Documentation/devicetree/bindings/sound/tlv320aic3x.txt | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
index ba5b45c483f5..9796c4639262 100644
--- a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
+++ b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
@@ -17,7 +17,7 @@ Required properties:
 
 Optional properties:
 
-- gpio-reset - gpio pin number used for codec reset
+- reset-gpios - GPIO specification for the active low RESET input.
 - ai3x-gpio-func - <array of 2 int> - AIC3X_GPIO1 & AIC3X_GPIO2 Functionality
 				    - Not supported on tlv320aic3104
 - ai3x-micbias-vg - MicBias Voltage required.
@@ -34,6 +34,10 @@ Optional properties:
 - AVDD-supply, IOVDD-supply, DRVDD-supply, DVDD-supply : power supplies for the
   device as covered in Documentation/devicetree/bindings/regulator/regulator.txt
 
+Deprecated properties:
+
+- gpio-reset - gpio pin number used for codec reset
+
 CODEC output pins:
   * LLOUT
   * RLOUT
@@ -61,10 +65,14 @@ The pins can be used in referring sound node's audio-routing property.
 
 Example:
 
+#include <dt-bindings/gpio/gpio.h>
+
 tlv320aic3x: tlv320aic3x@1b {
 	compatible = "ti,tlv320aic3x";
 	reg = <0x1b>;
 
+	reset-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
+
 	AVDD-supply = <&regulator>;
 	IOVDD-supply = <&regulator>;
 	DRVDD-supply = <&regulator>;
-- 
2.15.0

WARNING: multiple messages have this Message-ID (diff)
From: "Andrew F. Davis" <afd-l0cyMroinI0@public.gmane.org>
To: "Liam Girdwood"
	<lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Mark Brown" <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"Rob Herring" <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"Mark Rutland" <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	"Benoît Cousson"
	<bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
	"Tony Lindgren" <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
	"Shawn Guo" <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"Sascha Hauer" <kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"Andrew F . Davis" <afd-l0cyMroinI0@public.gmane.org>
Subject: [PATCH v2 2/8] ASoC: tlv320aic3x: Fix typo in DT binding documentation
Date: Wed, 29 Nov 2017 11:13:53 -0600	[thread overview]
Message-ID: <20171129171359.29382-3-afd@ti.com> (raw)
In-Reply-To: <20171129171359.29382-1-afd-l0cyMroinI0@public.gmane.org>

The property used to specify a GPIO intended for reset is "reset-gpios",
this binding uses "gpio-reset", as almost all other bindings use the
former name this use of the latter was certainly not intended. It is not
compatible with newer methods used to fetch GPIO pins and to prevent the
spread of this error to other bindings lets fix this here.

We also standardize the pin as active-low, different device trees have
marked the GPIO different ways, luckily the driver currently uses the
low-level GPIO set function which does not respect the active-low flag,
but future changes may change this. This is an active-low reset, mark
it as such.

Lastly, add an example of use for this property.

Fixes: c24fdc886fde ("ASoC: tlv320aic3x: Add device tree bindings")

Signed-off-by: Andrew F. Davis <afd-l0cyMroinI0@public.gmane.org>
---
 Documentation/devicetree/bindings/sound/tlv320aic3x.txt | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
index ba5b45c483f5..9796c4639262 100644
--- a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
+++ b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
@@ -17,7 +17,7 @@ Required properties:
 
 Optional properties:
 
-- gpio-reset - gpio pin number used for codec reset
+- reset-gpios - GPIO specification for the active low RESET input.
 - ai3x-gpio-func - <array of 2 int> - AIC3X_GPIO1 & AIC3X_GPIO2 Functionality
 				    - Not supported on tlv320aic3104
 - ai3x-micbias-vg - MicBias Voltage required.
@@ -34,6 +34,10 @@ Optional properties:
 - AVDD-supply, IOVDD-supply, DRVDD-supply, DVDD-supply : power supplies for the
   device as covered in Documentation/devicetree/bindings/regulator/regulator.txt
 
+Deprecated properties:
+
+- gpio-reset - gpio pin number used for codec reset
+
 CODEC output pins:
   * LLOUT
   * RLOUT
@@ -61,10 +65,14 @@ The pins can be used in referring sound node's audio-routing property.
 
 Example:
 
+#include <dt-bindings/gpio/gpio.h>
+
 tlv320aic3x: tlv320aic3x@1b {
 	compatible = "ti,tlv320aic3x";
 	reg = <0x1b>;
 
+	reset-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
+
 	AVDD-supply = <&regulator>;
 	IOVDD-supply = <&regulator>;
 	DRVDD-supply = <&regulator>;
-- 
2.15.0

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

  parent reply	other threads:[~2017-11-29 17:15 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29 17:13 [PATCH v2 0/8] Remove use of "gpio-reset" from DT Andrew F. Davis
2017-11-29 17:13 ` Andrew F. Davis
2017-11-29 17:13 ` [PATCH v2 1/8] ASoC: tlv320aic31xx: Fix typo in DT binding documentation Andrew F. Davis
2017-11-29 17:13   ` Andrew F. Davis
2017-11-30 11:43   ` Mark Brown
2017-11-30 11:43     ` Mark Brown
2017-11-30 12:33   ` Applied "ASoC: tlv320aic31xx: Rename property for reset GPIO" to the asoc tree Mark Brown
2017-11-29 17:13 ` Andrew F. Davis [this message]
2017-11-29 17:13   ` [PATCH v2 2/8] ASoC: tlv320aic3x: Fix typo in DT binding documentation Andrew F. Davis
2017-11-30 12:33   ` Applied "ASoC: tlv320aic3x: Rename property for reset GPIO" to the asoc tree Mark Brown
2017-11-29 17:13 ` [PATCH v2 3/8] ASoC: tlv320aic31xx: Fix the reset GPIO OF name Andrew F. Davis
2017-11-29 17:13   ` Andrew F. Davis
2017-11-30 12:33   ` Applied "ASoC: tlv320aic31xx: Use standard reset GPIO OF name" to the asoc tree Mark Brown
2017-11-29 17:13 ` [PATCH v2 4/8] ASoC: tlv320aic3x: Fix the reset GPIO OF name Andrew F. Davis
2017-11-29 17:13   ` Andrew F. Davis
2017-11-30 12:33   ` Applied "ASoC: tlv320aic3x: Use standard reset GPIO OF name" to the asoc tree Mark Brown
2017-11-29 17:13 ` [PATCH v2 5/8] ARM: dts: am335x-pepper: Fix the audio CODEC's reset pin Andrew F. Davis
2017-11-29 17:13   ` Andrew F. Davis
2017-11-30 16:18   ` Tony Lindgren
2017-11-30 16:33     ` Mark Brown
2017-11-30 16:33       ` Mark Brown
2017-11-30 16:37       ` Andrew F. Davis
2017-11-30 16:37         ` Andrew F. Davis
2017-11-30 16:53         ` Mark Brown
2017-11-30 16:53           ` Mark Brown
2017-11-30 17:00           ` Tony Lindgren
2017-11-29 17:13 ` [PATCH v2 6/8] ARM: dts: imx6: RDU2: " Andrew F. Davis
2017-11-29 17:13   ` Andrew F. Davis
2017-11-29 17:13 ` [PATCH v2 7/8] ARM: dts: imx: " Andrew F. Davis
2017-11-29 17:13   ` Andrew F. Davis
2017-11-29 17:13 ` [PATCH v2 8/8] ARM: dts: omap3-n900: " Andrew F. Davis
2017-11-29 17:13   ` Andrew F. Davis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171129171359.29382-3-afd@ti.com \
    --to=afd@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bcousson@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.