@@ -11,11 +11,13 @@
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/err.h>
#include <linux/clk.h>
#include <linux/mmc/host.h>
#include <linux/mmc/dw_mmc.h>
#include <linux/of.h>
#include <linux/of_gpio.h>
+#include <linux/pinctrl/consumer.h>
#include "dw_mmc.h"
#include "dw_mmc-pltfm.h"
@@ -36,6 +38,8 @@
#define EXYNOS4210_FIXED_CIU_CLK_DIV 2
#define EXYNOS4412_FIXED_CIU_CLK_DIV 4
+static struct pinctrl *pctrl;
+
/* Variations in Exynos specific dw-mshc controller */
enum dw_mci_exynos_type {
DW_MCI_TYPE_EXYNOS4210,
@@ -160,6 +164,10 @@ static int dw_mci_exynos_setup_bus(struct dw_mci *host,
if (!slot_np)
return -EINVAL;
+ pctrl = devm_pinctrl_get_select_default(host->dev);
+ if (!IS_ERR(pctrl))
+ return 0;
+
/* cmd + clock + bus-width pins */
for (idx = 0; idx < NUM_PINS(bus_width); idx++) {
gpio = of_get_gpio(slot_np, idx);
Added support for pin configuration using pinctrl subsystem. Cc: Thomas Abraham <thomas.abraham@linaro.org> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- drivers/mmc/host/dw_mmc-exynos.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)