Merge remote-tracking branch 'asoc/topic/cs4271' into asoc-next
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 9 Dec 2012 15:22:04 +0000 (00:22 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 9 Dec 2012 15:22:04 +0000 (00:22 +0900)
1  2 
sound/soc/codecs/cs4271.c

index e3f0a7f3131e14b7895aadf2daf8bf81f6058d8b,2ac5fe61a96c9f893cb09014b9fcb2772997fa4c..6ad3878db8fcf4663cf948812f6b063a5993acfb
@@@ -474,18 -474,28 +474,28 @@@ static int cs4271_probe(struct snd_soc_
        struct cs4271_platform_data *cs4271plat = codec->dev->platform_data;
        int ret;
        int gpio_nreset = -EINVAL;
+       int amutec_eq_bmutec = 0;
  
  #ifdef CONFIG_OF
-       if (of_match_device(cs4271_dt_ids, codec->dev))
+       if (of_match_device(cs4271_dt_ids, codec->dev)) {
                gpio_nreset = of_get_named_gpio(codec->dev->of_node,
                                                "reset-gpio", 0);
+               if (!of_get_property(codec->dev->of_node,
+                                    "cirrus,amutec-eq-bmutec", NULL))
+                       amutec_eq_bmutec = 1;
+       }
  #endif
  
-       if (cs4271plat && gpio_is_valid(cs4271plat->gpio_nreset))
-               gpio_nreset = cs4271plat->gpio_nreset;
+       if (cs4271plat) {
+               if (gpio_is_valid(cs4271plat->gpio_nreset))
+                       gpio_nreset = cs4271plat->gpio_nreset;
+               amutec_eq_bmutec = cs4271plat->amutec_eq_bmutec;
+       }
  
        if (gpio_nreset >= 0)
 -              if (gpio_request(gpio_nreset, "CS4271 Reset"))
 +              if (devm_gpio_request(codec->dev, gpio_nreset, "CS4271 Reset"))
                        gpio_nreset = -EINVAL;
        if (gpio_nreset >= 0) {
                /* Reset codec */