diff mbox series

[v4,2/2] ASoC: tas2562: Update shutdown GPIO property

Message ID 20200612171412.25423-2-dmurphy@ti.com (mailing list archive)
State New, archived
Headers show
Series [v4,1/2] dt-bindings: tas2562: Convert the tas2562 binding to yaml | expand

Commit Message

Dan Murphy June 12, 2020, 5:14 p.m. UTC
Update the shutdown GPIO property to be shutdown from shut-down.

Fixes: c173dba44c2d2 ("ASoC: tas2562: Introduce the TAS2562 amplifier")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
 sound/soc/codecs/tas2562.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

Comments

Dan Murphy June 23, 2020, 3:59 p.m. UTC | #1
Hello

On 6/12/20 12:14 PM, Dan Murphy wrote:
> Update the shutdown GPIO property to be shutdown from shut-down.

I have some other patches that go on top of this patchset I am wondering 
if I should re-submit with those patches on top or indicate in a cover 
letter the dependency

Dan
Mark Brown June 23, 2020, 5:18 p.m. UTC | #2
On Tue, Jun 23, 2020 at 10:59:49AM -0500, Dan Murphy wrote:
> On 6/12/20 12:14 PM, Dan Murphy wrote:
> > Update the shutdown GPIO property to be shutdown from shut-down.

> I have some other patches that go on top of this patchset I am wondering if
> I should re-submit with those patches on top or indicate in a cover letter
> the dependency

If you decide to resubmit please make the YAML conversion the very last
thing you do in your series, there is a considerable backlog on YAML
conversion reviews which slows down any changes that depend on them.
Dan Murphy June 23, 2020, 5:20 p.m. UTC | #3
Mark

On 6/23/20 12:18 PM, Mark Brown wrote:
> On Tue, Jun 23, 2020 at 10:59:49AM -0500, Dan Murphy wrote:
>> On 6/12/20 12:14 PM, Dan Murphy wrote:
>>> Update the shutdown GPIO property to be shutdown from shut-down.
>> I have some other patches that go on top of this patchset I am wondering if
>> I should re-submit with those patches on top or indicate in a cover letter
>> the dependency
> If you decide to resubmit please make the YAML conversion the very last
> thing you do in your series, there is a considerable backlog on YAML
> conversion reviews which slows down any changes that depend on them.

Thanks for the advice.  I know the DT folks have a lot to review and the 
merge window did not help them.

I will re-factor these and re-submit as well as the TAS2770 patchset.

Dan
diff mbox series

Patch

diff --git a/sound/soc/codecs/tas2562.c b/sound/soc/codecs/tas2562.c
index 7fae88655a0f..6026d8b1e7d3 100644
--- a/sound/soc/codecs/tas2562.c
+++ b/sound/soc/codecs/tas2562.c
@@ -619,7 +619,7 @@  static int tas2562_parse_dt(struct tas2562_data *tas2562)
 	struct device *dev = tas2562->dev;
 	int ret = 0;
 
-	tas2562->sdz_gpio = devm_gpiod_get_optional(dev, "shut-down-gpio",
+	tas2562->sdz_gpio = devm_gpiod_get_optional(dev, "shutdown",
 						      GPIOD_OUT_HIGH);
 	if (IS_ERR(tas2562->sdz_gpio)) {
 		if (PTR_ERR(tas2562->sdz_gpio) == -EPROBE_DEFER) {
@@ -628,6 +628,21 @@  static int tas2562_parse_dt(struct tas2562_data *tas2562)
 		}
 	}
 
+	/*
+	 * The shut-down property is deprecated but needs to be checked for
+	 * backwards compatibility.
+	 */
+	if (tas2562->sdz_gpio == NULL) {
+		tas2562->sdz_gpio = devm_gpiod_get_optional(dev, "shut-down",
+							      GPIOD_OUT_HIGH);
+		if (IS_ERR(tas2562->sdz_gpio)) {
+			if (PTR_ERR(tas2562->sdz_gpio) == -EPROBE_DEFER) {
+				tas2562->sdz_gpio = NULL;
+				return -EPROBE_DEFER;
+			}
+		}
+	}
+
 	ret = fwnode_property_read_u32(dev->fwnode, "ti,imon-slot-no",
 			&tas2562->i_sense_slot);
 	if (ret)