From: Mark Brown Date: Sun, 2 Dec 2012 04:35:00 +0000 (+0900) Subject: Merge remote-tracking branch 'asoc/topic/cs4271' into asoc-next X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0998deb561fd2fd0e8743643afdc3477750e21fa;p=openwrt%2Fstaging%2Fblogic.git Merge remote-tracking branch 'asoc/topic/cs4271' into asoc-next --- 0998deb561fd2fd0e8743643afdc3477750e21fa diff --cc sound/soc/codecs/cs4271.c index e3f0a7f3131e,2ac5fe61a96c..6ad3878db8fc --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c @@@ -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 */