Commit 46b76035 authored by Daniel Mack's avatar Daniel Mack Committed by Chris Ball

mmc: omap_hsmmc: claim pinctrl at probe time

This allows DT-driven board to set up the pin mux only when the driver
is in use.
Signed-off-by: default avatarDaniel Mack <zonque@gmail.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarVenkatraman S <svenkatr@ti.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 2cb53552
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
#include <linux/pinctrl/consumer.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <plat/mmc.h> #include <plat/mmc.h>
...@@ -1725,6 +1726,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) ...@@ -1725,6 +1726,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
const struct of_device_id *match; const struct of_device_id *match;
dma_cap_mask_t mask; dma_cap_mask_t mask;
unsigned tx_req, rx_req; unsigned tx_req, rx_req;
struct pinctrl *pinctrl;
match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev); match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev);
if (match) { if (match) {
...@@ -1928,6 +1930,11 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) ...@@ -1928,6 +1930,11 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
omap_hsmmc_disable_irq(host); omap_hsmmc_disable_irq(host);
pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
if (IS_ERR(pinctrl))
dev_warn(&pdev->dev,
"pins are not configured from the driver\n");
omap_hsmmc_protect_card(host); omap_hsmmc_protect_card(host);
mmc_add_host(mmc); mmc_add_host(mmc);
......
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