diff options
author | Andrew F. Davis <afd@ti.com> | 2017-11-29 18:13:55 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-11-30 13:27:05 +0100 |
commit | 025f8449818c46770f5652a0263f8cfb89d01455 (patch) | |
tree | 758ebbc0074e7187ccf701789f3e914440d04cf8 /sound/soc/codecs/tlv320aic3x.c | |
parent | ASoC: tlv320aic3x: Rename property for reset GPIO (diff) | |
download | linux-025f8449818c46770f5652a0263f8cfb89d01455.tar.xz linux-025f8449818c46770f5652a0263f8cfb89d01455.zip |
ASoC: tlv320aic3x: Use standard reset GPIO OF name
The correct DT property for specifying a GPIO used for reset
is "reset-gpios", fix this here.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/tlv320aic3x.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 06f92571eba4..b751cad545da 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -1804,11 +1804,18 @@ static int aic3x_i2c_probe(struct i2c_client *i2c, if (!ai3x_setup) return -ENOMEM; - ret = of_get_named_gpio(np, "gpio-reset", 0); - if (ret >= 0) + ret = of_get_named_gpio(np, "reset-gpios", 0); + if (ret >= 0) { aic3x->gpio_reset = ret; - else - aic3x->gpio_reset = -1; + } else { + ret = of_get_named_gpio(np, "gpio-reset", 0); + if (ret > 0) { + dev_warn(&i2c->dev, "Using deprecated property \"gpio-reset\", please update your DT"); + aic3x->gpio_reset = ret; + } else { + aic3x->gpio_reset = -1; + } + } if (of_property_read_u32_array(np, "ai3x-gpio-func", ai3x_setup->gpio_func, 2) >= 0) { |