Added support for pin configuration using pinctrl subsystem.

Cc: Thomas Abraham <[email protected]>
Cc: Linus Walleij <[email protected]>
Signed-off-by: Sachin Kamat <[email protected]>
---
 drivers/mmc/host/dw_mmc-exynos.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
index f15b4d3..31f5f47 100644
--- a/drivers/mmc/host/dw_mmc-exynos.c
+++ b/drivers/mmc/host/dw_mmc-exynos.c
@@ -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);
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to