Skip to contentSkip to conversation

mmc: omap_hsmmc: support more DT properties

PATCH Superseded Daniel Mack 2 participants 3 messages Feb 17, 2014 – Feb 24, 2014

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

PATCH 1/1 mmc: omap_hsmmc: support more DT properties

This should probably be done implicitly through mmc_of_parse(), but that doesn't play well along with the multi-slot model the hsmmc driver features. Hence, for now, do it manually. The properties are already documented in Documentation/devicetree/bindings/mmc/mmc.txt.

---
 drivers/mmc/host/omap_hsmmc.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/mmc/host/omap_hsmmc.c +6 -0
index 2815de6..a5a38cc 100644
@@ -1765,6 +1765,12 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
 	if (of_find_property(np, "ti,needs-special-hs-handling", NULL))
 		pdata->slots[0].features |= HSMMC_HAS_HSPE_SUPPORT;
 
+	if (of_find_property(np, "keep-power-in-suspend", NULL))
+		pdata->slots[0].pm_caps |= MMC_PM_KEEP_POWER;
+
+	if (of_find_property(np, "enable-sdio-wakeup", NULL))
+		pdata->slots[0].pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
+
 	return pdata;
 }
 #else
Signature · 1 line
1.8.5.3
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Daniel Mack

This should probably be done implicitly through mmc_of_parse(), but that doesn't play well along with the multi-slot model the hsmmc driver features. Hence, for now, do it manually. The properties are already documented in Documentation/devicetree/bindings/mmc/mmc.txt.

looks good to me

Quoted 22 lines
---
  drivers/mmc/host/omap_hsmmc.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/mmc/host/omap_hsmmc.c +6 -0
index 2815de6..a5a38cc 100644
@@ -1765,6 +1765,12 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
  	if (of_find_property(np, "ti,needs-special-hs-handling", NULL))
  		pdata->slots[0].features |= HSMMC_HAS_HSPE_SUPPORT;
 
+	if (of_find_property(np, "keep-power-in-suspend", NULL))
+		pdata->slots[0].pm_caps |= MMC_PM_KEEP_POWER;
+
+	if (of_find_property(np, "enable-sdio-wakeup", NULL))
+		pdata->slots[0].pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
+
  	return pdata;
  }
  #else
#2 lore raw
Quoted 10 lines · Balaji T K
Quoted 6 lines · Daniel Mack

This should probably be done implicitly through mmc_of_parse(), but that doesn't play well along with the multi-slot model the hsmmc driver features. Hence, for now, do it manually. The properties are already documented in Documentation/devicetree/bindings/mmc/mmc.txt.

looks good to me

Thanks for the review! Did it land in any tree yet?

Best regards,
Daniel

Quoted 23 lines
Quoted 22 lines
---
  drivers/mmc/host/omap_hsmmc.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/mmc/host/omap_hsmmc.c +6 -0
index 2815de6..a5a38cc 100644
@@ -1765,6 +1765,12 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
  	if (of_find_property(np, "ti,needs-special-hs-handling", NULL))
  		pdata->slots[0].features |= HSMMC_HAS_HSPE_SUPPORT;
 
+	if (of_find_property(np, "keep-power-in-suspend", NULL))
+		pdata->slots[0].pm_caps |= MMC_PM_KEEP_POWER;
+
+	if (of_find_property(np, "enable-sdio-wakeup", NULL))
+		pdata->slots[0].pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
+
  	return pdata;
  }
  #else