Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_gpio.h>
+#include <linux/pinctrl/consumer.h>
#include <linux/pm_runtime.h>
#include <sound/soc.h>
}
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;