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

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
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment