Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e62d8b8f authored by Dong Aisheng's avatar Dong Aisheng Committed by Shawn Guo
Browse files

mmc: sdhci-imx-esdhc: adopt pinctrl support



Cc: linux-mmc@vger.kernel.org
Cc: Chris Ball <cjb@laptop.org>
Signed-off-by: default avatarDong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Acked-by: default avatarStephen Warren <swarren@wwwdotorg.org>
parent 32329a2c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_gpio.h>
#include <linux/pinctrl/consumer.h>
#include <mach/esdhc.h>
#include "sdhci-pltfm.h"
#include "sdhci-esdhc.h"
@@ -68,6 +69,7 @@ struct pltfm_imx_data {
	int flags;
	u32 scratchpad;
	enum imx_esdhc_type devtype;
	struct pinctrl *pinctrl;
	struct esdhc_platform_data boarddata;
};

@@ -467,6 +469,12 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
	clk_prepare_enable(clk);
	pltfm_host->clk = clk;

	imx_data->pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
	if (IS_ERR(imx_data->pinctrl)) {
		err = PTR_ERR(imx_data->pinctrl);
		goto pin_err;
	}

	host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;

	if (is_imx25_esdhc(imx_data) || is_imx35_esdhc(imx_data))
@@ -558,6 +566,7 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
		gpio_free(boarddata->wp_gpio);
no_card_detect_pin:
no_board_data:
pin_err:
	clk_disable_unprepare(pltfm_host->clk);
	clk_put(pltfm_host->clk);
err_clk_get: