[alsa-devel] [PATCH RFC 1/8] ASoC: davinci-mcasp: Add pinctrl support

oku at iki.fi oku at iki.fi
Mon Sep 9 17:12:12 CEST 2013


From: Joel A Fernandes <agnel.joel at gmail.com>

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar at ti.com>
Signed-off-by: Joel A Fernandes <agnel.joel at gmail.com>
Signed-off-by: Darren Etheridge <detheridge at ti.com>
Signed-off-by: Jyri Sarha <jsarha at ti.com>
---
 sound/soc/davinci/davinci-mcasp.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 32ddb7f..b849c9d 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -25,6 +25,7 @@
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/of_device.h>
+#include <linux/pinctrl/consumer.h>
 
 #include <sound/core.h>
 #include <sound/pcm.h>
@@ -1127,6 +1128,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
 	struct resource *mem, *ioarea, *res;
 	struct snd_platform_data *pdata;
 	struct davinci_audio_dev *dev;
+	struct pinctrl *pinctrl;
 	int ret;
 
 	if (!pdev->dev.platform_data && !pdev->dev.of_node) {
@@ -1158,6 +1160,11 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
 		return -EBUSY;
 	}
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl))
+		dev_warn(&pdev->dev,
+			 "pins are not configured from the driver\n");
+
 	pm_runtime_enable(&pdev->dev);
 
 	ret = pm_runtime_get_sync(&pdev->dev);
-- 
1.7.9.5



More information about the Alsa-devel mailing list