Skip to contentSkip to conversation

ASoC: sam9g20ek: Let device core handle pinctrl

PATCH In review Mark Brown 3 participants 4 messages May 6, 2013 – May 7, 2013

Subsystems (4)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: sam9g20ek: Let device core handle pinctrl

Since commit ab78029 (drivers/pinctrl: grab default handles from device core) we can rely on device core for handling pinctrl so remove devm_pinctrl_get_select_default() from the driver.

---
 sound/soc/atmel/sam9g20_wm8731.c |    9 ---------
 1 file changed, 9 deletions(-)
sound/soc/atmel/sam9g20_wm8731.c +0 -9
index 2d6fbd0..802717e 100644
@@ -38,8 +38,6 @@
 #include <linux/platform_device.h>
 #include <linux/i2c.h>
 
-#include <linux/pinctrl/consumer.h>
-
 #include <linux/atmel-ssc.h>
 
 #include <sound/core.h>
@@ -203,15 +201,8 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev)
 	struct device_node *codec_np, *cpu_np;
 	struct clk *pllb;
 	struct snd_soc_card *card = &snd_soc_at91sam9g20ek;
-	struct pinctrl *pinctrl;
 	int ret;
 
-	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-	if (IS_ERR(pinctrl)) {
-		dev_err(&pdev->dev, "Failed to request pinctrl for mck\n");
-		return PTR_ERR(pinctrl);
-	}
-
 	if (!np) {
 		if (!(machine_is_at91sam9g20ek() ||
 			machine_is_at91sam9g20ek_2mmc()))
Signature · 1 line
1.7.10.4
#1 lore raw

Hi Mark,

Quoted 25 lines · Mark Brown

Since commit ab78029 (drivers/pinctrl: grab default handles from device core) we can rely on device core for handling pinctrl so remove devm_pinctrl_get_select_default() from the driver.

---
  sound/soc/atmel/sam9g20_wm8731.c |    9 ---------
  1 file changed, 9 deletions(-)
sound/soc/atmel/sam9g20_wm8731.c +0 -2
index 2d6fbd0..802717e 100644
@@ -38,8 +38,6 @@
  #include <linux/platform_device.h>
  #include <linux/i2c.h>
 
-#include <linux/pinctrl/consumer.h>
-
  #include <linux/atmel-ssc.h>
 
  #include <sound/core.h>
@@ -203,15 +201,8 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev)
  	struct device_node *codec_np, *cpu_np;
  	struct clk *pllb;

sound/soc/atmel/sam9g20_wm8731.c static int at91sam9g20ek_audio_probe(struct platform_device *pdev) · line 214

Quoted 10 lines
sound/soc/atmel/sam9g20_wm8731.c +0 -7
  	struct snd_soc_card *card = &snd_soc_at91sam9g20ek;
-	struct pinctrl *pinctrl;
  	int ret;
 
-	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-	if (IS_ERR(pinctrl)) {
-		dev_err(&pdev->dev, "Failed to request pinctrl for mck\n");
-		return PTR_ERR(pinctrl);
-	}
-

I have one question: with this patch, if lose default pinctrl configuration in dts/dtsi file, how should we know that?

Best Regards,
Bo Shen

maintainer
#2 lore raw
Quoted 8 lines · Bo Shen
Quoted 3 lines · Mark Brown

Since commit ab78029 (drivers/pinctrl: grab default handles from device core) we can rely on device core for handling pinctrl so remove devm_pinctrl_get_select_default() from the driver.

I have one question: with this patch, if lose default pinctrl configuration in dts/dtsi file, how should we know that?

I'd hope the core does something sensible with this, though I've not checked.

Tested-by Acked-by
#3 lore raw

Hi Mark,

Quoted 7 lines · Mark Brown
Quoted 5 lines · Bo Shen
Quoted 3 lines · Mark Brown

Since commit ab78029 (drivers/pinctrl: grab default handles from device core) we can rely on device core for handling pinctrl so remove devm_pinctrl_get_select_default() from the driver.

Quoted 5 lines
Quoted 2 lines

I have one question: with this patch, if lose default pinctrl configuration in dts/dtsi file, how should we know that?

I'd hope the core does something sensible with this, though I've not checked.

except this consideration.

Best Regards,
Bo Shen