diff mbox series

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

Message ID 20200612160603.2456-2-dmurphy@ti.com
State New
Headers show
Series [v3,1/2] dt-bindings: tas2562: Convert the tas2562 binding to yaml | expand

Commit Message

Dan Murphy June 12, 2020, 4:06 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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.26.2

Comments

Mark Brown June 12, 2020, 4:09 p.m. UTC | #1
On Fri, Jun 12, 2020 at 11:06:03AM -0500, Dan Murphy wrote:

> -	tas2562->sdz_gpio = devm_gpiod_get_optional(dev, "shut-down-gpio",

> +	tas2562->sdz_gpio = devm_gpiod_get_optional(dev, "shutdown",

>  						      GPIOD_OUT_HIGH);


This also changes the name from shut-down to shutdown which will be
incompatible (IIRC we do try -gpio as well as -gpios).
Dan Murphy June 12, 2020, 4:18 p.m. UTC | #2
Mark

On 6/12/20 11:09 AM, Mark Brown wrote:
> On Fri, Jun 12, 2020 at 11:06:03AM -0500, Dan Murphy wrote:

>

>> -	tas2562->sdz_gpio = devm_gpiod_get_optional(dev, "shut-down-gpio",

>> +	tas2562->sdz_gpio = devm_gpiod_get_optional(dev, "shutdown",

>>   						      GPIOD_OUT_HIGH);

> This also changes the name from shut-down to shutdown which will be

> incompatible (IIRC we do try -gpio as well as -gpios).

Yes the non-standardish name was highlighted by Rob[1].

Also I checked the GPIO library and it looks at both -gpio and gpios as 
property suffixes.

Since this is a single GPIO the singular should be used in this case

[1] https://lore.kernel.org/patchwork/patch/1251670/

Dan
Mark Brown June 12, 2020, 4:22 p.m. UTC | #3
On Fri, Jun 12, 2020 at 11:18:57AM -0500, Dan Murphy wrote:
> On 6/12/20 11:09 AM, Mark Brown wrote:

> > On Fri, Jun 12, 2020 at 11:06:03AM -0500, Dan Murphy wrote:


> > > -	tas2562->sdz_gpio = devm_gpiod_get_optional(dev, "shut-down-gpio",

> > > +	tas2562->sdz_gpio = devm_gpiod_get_optional(dev, "shutdown",

> > >   						      GPIOD_OUT_HIGH);


> > This also changes the name from shut-down to shutdown which will be

> > incompatible (IIRC we do try -gpio as well as -gpios).


> Yes the non-standardish name was highlighted by Rob[1].


Yes, but we released with it so it's an ABI now and we should still
support the old name.
Dan Murphy June 12, 2020, 4:27 p.m. UTC | #4
Mark

On 6/12/20 11:22 AM, Mark Brown wrote:
> On Fri, Jun 12, 2020 at 11:18:57AM -0500, Dan Murphy wrote:

>> On 6/12/20 11:09 AM, Mark Brown wrote:

>>> On Fri, Jun 12, 2020 at 11:06:03AM -0500, Dan Murphy wrote:

>>>> -	tas2562->sdz_gpio = devm_gpiod_get_optional(dev, "shut-down-gpio",

>>>> +	tas2562->sdz_gpio = devm_gpiod_get_optional(dev, "shutdown",

>>>>    						      GPIOD_OUT_HIGH);

>>> This also changes the name from shut-down to shutdown which will be

>>> incompatible (IIRC we do try -gpio as well as -gpios).

>> Yes the non-standardish name was highlighted by Rob[1].

> Yes, but we released with it so it's an ABI now and we should still

> support the old name.


Well should we then just revert back to the non-standard name and just 
fix up the code?

Or should we support both properties?

Dan
Mark Brown June 12, 2020, 4:30 p.m. UTC | #5
On Fri, Jun 12, 2020 at 11:27:04AM -0500, Dan Murphy wrote:

> Well should we then just revert back to the non-standard name and just fix

> up the code?


> Or should we support both properties?


Either option is fine for me, supporting both is a little nicer.
Dan Murphy June 12, 2020, 4:56 p.m. UTC | #6
Mark

On 6/12/20 11:30 AM, Mark Brown wrote:
> On Fri, Jun 12, 2020 at 11:27:04AM -0500, Dan Murphy wrote:

>

>> Well should we then just revert back to the non-standard name and just fix

>> up the code?

>> Or should we support both properties?

> Either option is fine for me, supporting both is a little nicer.


Sounds good I will mark the incorrect property as deprecated: true

Dan
diff mbox series

Patch

diff --git a/sound/soc/codecs/tas2562.c b/sound/soc/codecs/tas2562.c
index 7fae88655a0f..a2019ec07c3d 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) {