Skip to contentSkip to conversation

mmc: core: expose MMC_CAP_AGGRESSIVE_PM to DT

PATCH In review Hermes Zhang 2 participants 2 messages Jan 18, 2023 – Jan 24, 2023 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: core: expose MMC_CAP_AGGRESSIVE_PM to DT

This patch expose the MMC_CAP_AGGRESSIVE_PM flag to DT which allows the host to enable it from DT.

---
 drivers/mmc/core/host.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/core/host.c +2 -0
index d17eda753b7e..1d98a301515d 100644
@@ -376,6 +376,8 @@ int mmc_of_parse(struct mmc_host *host)
 		host->caps |= MMC_CAP_HW_RESET;
 	if (device_property_read_bool(dev, "cap-sdio-irq"))
 		host->caps |= MMC_CAP_SDIO_IRQ;
+	if (device_property_read_bool(dev, "cap-aggressive-pm"))
+		host->caps |= MMC_CAP_AGGRESSIVE_PM;
 	if (device_property_read_bool(dev, "full-pwr-cycle"))
 		host->caps2 |= MMC_CAP2_FULL_PWR_CYCLE;
 	if (device_property_read_bool(dev, "full-pwr-cycle-in-suspend"))
Signature · 1 line
2.30.2
#1 lore raw
Quoted 14 lines · Hermes Zhang

This patch expose the MMC_CAP_AGGRESSIVE_PM flag to DT which allows the host to enable it from DT.

---
 drivers/mmc/core/host.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/core/host.c +0 -0
index d17eda753b7e..1d98a301515d 100644

drivers/mmc/core/host.c int mmc_of_parse(struct mmc_host *host) · line 380

Quoted 5 lines
drivers/mmc/core/host.c +2 -0
@@ -376,6 +376,8 @@ int mmc_of_parse(struct mmc_host *host)
                host->caps |= MMC_CAP_HW_RESET;
        if (device_property_read_bool(dev, "cap-sdio-irq"))
                host->caps |= MMC_CAP_SDIO_IRQ;
+       if (device_property_read_bool(dev, "cap-aggressive-pm"))
+               host->caps |= MMC_CAP_AGGRESSIVE_PM;

I think this can be debated whether this is a description of some characteristics of the HW.

That said, please add the DT list and maintainers and resend, to let them share their view too.

drivers/mmc/core/host.c int mmc_of_parse(struct mmc_host *host)

Quoted 4 lines
drivers/mmc/core/host.c +0 -1
        if (device_property_read_bool(dev, "full-pwr-cycle"))
                host->caps2 |= MMC_CAP2_FULL_PWR_CYCLE;
        if (device_property_read_bool(dev, "full-pwr-cycle-in-suspend"))
--

Kind regards
Uffe