From ce4c468439b3ac0f7e68a8ab364fb23cdabdf228 Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Thu, 14 Feb 2013 18:33:26 +0100 Subject: [PATCH] ASoC: samsung: Add pinctrl support to I2S driver Signed-off-by: Sylwester Nawrocki --- sound/soc/samsung/i2s.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 5c9b5e4..af6744a 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -1232,7 +1233,10 @@ static int samsung_i2s_probe(struct platform_device *pdev) } if (np) { - if (samsung_i2s_parse_dt_gpio(pri_dai)) { + struct pinctrl *pctrl; + pctrl = devm_pinctrl_get_select_default(&pdev->dev); + + if (IS_ERR(pctrl) && samsung_i2s_parse_dt_gpio(pri_dai)) { dev_err(&pdev->dev, "Unable to configure gpio\n"); ret = -EINVAL; goto err; -- 2.7.4