Skip to contentSkip to conversation

mmc: omap_hsmmc: get capabilities from DT

PATCH New Daniel Mack 2 participants 2 messages Aug 14, 2013 – Aug 25, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: omap_hsmmc: get capabilities from DT

When used in DT mode, the omap hsmmc driver has to take capabilites given in DT by calling mmc_of_parse().

---
 drivers/mmc/host/omap_hsmmc.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/mmc/host/omap_hsmmc.c +9 -1
index 1865321..31337c1 100644
@@ -1907,7 +1907,15 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
 	if (mmc_slot(host).nonremovable)
 		mmc->caps |= MMC_CAP_NONREMOVABLE;
 
-	mmc->pm_caps = mmc_slot(host).pm_caps;
+	if (pdev->dev.of_node) {
+		ret = mmc_of_parse(mmc);
+		if (ret < 0) {
+			dev_err(&pdev->dev, "mmc_of_parse() failed: %d\n", ret);
+			goto err_irq;
+		}
+	} else {
+		mmc->pm_caps = mmc_slot(host).pm_caps;
+	}
 
 	omap_hsmmc_conf_bus_power(host);
 
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/1 mmc: omap_hsmmc: get capabilities from DT

Hi,

Quoted 18 lines · Daniel Mack

When used in DT mode, the omap hsmmc driver has to take capabilites given in DT by calling mmc_of_parse().

---
 drivers/mmc/host/omap_hsmmc.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/mmc/host/omap_hsmmc.c +1 -1
index 1865321..31337c1 100644
@@ -1907,7 +1907,15 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
 	if (mmc_slot(host).nonremovable)
 		mmc->caps |= MMC_CAP_NONREMOVABLE;
 
-	mmc->pm_caps = mmc_slot(host).pm_caps;
+	if (pdev->dev.of_node) {

drivers/mmc/host/omap_hsmmc.c static int omap_hsmmc_probe(struct platform_device *pdev) · line 1920

Quoted 10 lines
drivers/mmc/host/omap_hsmmc.c +8 -0
+		ret = mmc_of_parse(mmc);
+		if (ret < 0) {
+			dev_err(&pdev->dev, "mmc_of_parse() failed: %d\n", ret);
+			goto err_irq;
+		}
+	} else {
+		mmc->pm_caps = mmc_slot(host).pm_caps;
+	}
 
 	omap_hsmmc_conf_bus_power(host);

Balaji, please can you review this patch? Thanks,

- Chris.

Signature · 1 line
Chris Ball   <[email protected]>   <http://printf.net/>