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