From 2b0c7de1eaf0e25c69ed1e4b21675ab97c6a4bdf Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Thu, 14 Feb 2013 18:33:26 +0100 Subject: 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(-) (limited to 'sound') diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 82ebb1a5147..78472d26615 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -1236,7 +1237,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; -- cgit v1.2.3