]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: tlv320aic3x: Use standard reset GPIO OF name
authorAndrew F. Davis <afd@ti.com>
Wed, 29 Nov 2017 17:13:55 +0000 (11:13 -0600)
committerMark Brown <broonie@kernel.org>
Thu, 30 Nov 2017 12:27:05 +0000 (12:27 +0000)
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>
sound/soc/codecs/tlv320aic3x.c

index 06f92571eba4622a89ae808911fd0b510ec2eed2..b751cad545da40d5e605ec4da2dd659b7cf19194 100644 (file)
@@ -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) {