aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/omap_hsmmc.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2012-10-15 12:05:05 -0400
committerChris Ball <cjb@laptop.org>2012-12-06 13:54:39 -0500
commit46b76035c12140caeda64dfd2557557263a30039 (patch)
tree8c57c223ef4804c37ca3254c7e1f661f121c2b51 /drivers/mmc/host/omap_hsmmc.c
parent2cb535529d52658613a2138677f5e497e633bead (diff)
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: Daniel Mack <zonque@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/omap_hsmmc.c')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index fedd258cc4ea..813ae0ac6286 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -37,6 +37,7 @@
37#include <linux/io.h> 37#include <linux/io.h>
38#include <linux/gpio.h> 38#include <linux/gpio.h>
39#include <linux/regulator/consumer.h> 39#include <linux/regulator/consumer.h>
40#include <linux/pinctrl/consumer.h>
40#include <linux/pm_runtime.h> 41#include <linux/pm_runtime.h>
41#include <mach/hardware.h> 42#include <mach/hardware.h>
42#include <plat/mmc.h> 43#include <plat/mmc.h>
@@ -1725,6 +1726,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
1725 const struct of_device_id *match; 1726 const struct of_device_id *match;
1726 dma_cap_mask_t mask; 1727 dma_cap_mask_t mask;
1727 unsigned tx_req, rx_req; 1728 unsigned tx_req, rx_req;
1729 struct pinctrl *pinctrl;
1728 1730
1729 match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev); 1731 match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev);
1730 if (match) { 1732 if (match) {
@@ -1928,6 +1930,11 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
1928 1930
1929 omap_hsmmc_disable_irq(host); 1931 omap_hsmmc_disable_irq(host);
1930 1932
1933 pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
1934 if (IS_ERR(pinctrl))
1935 dev_warn(&pdev->dev,
1936 "pins are not configured from the driver\n");
1937
1931 omap_hsmmc_protect_card(host); 1938 omap_hsmmc_protect_card(host);
1932 1939
1933 mmc_add_host(mmc); 1940 mmc_add_host(mmc);