[PATCH 2/2] mmc: core: Parse property for aggressive power management
Shawn Lin
shawn.lin at rock-chips.com
Mon Apr 20 19:46:49 PDT 2026
Aggressive power management is a framework-level policy rather than
a host driver or controller-specific feature. Currently, this
capability must be enabled by individual host drivers, which has led
to inconsistent adoption and limited real-world testing. This
all-or-nothing approach is inflexible, as the optimal setting depends
on the specific product requirements and usage patterns.
Introduce a new device-tree property "cap-aggressive-pm" to allow
platform-specific configuration of the MMC_CAP_AGGRESSIVE_PM flag.
This enables more aggressive runtime power management strategies that
can significantly improve power efficiency in certain scenarios.
However, the benefits of this feature are highly workload-dependent.
While it reduces power consumption during idle periods, it may also
introduce additional resume latency from low-power states. Therefore,
it should be configurable rather than hardcoded, allowing different
products to balance power savings against performance requirements.
By exposing this as a device-tree property, system integrators can
selectively enable aggressive power management for specific products
or use cases where power savings outweigh potential performance impact.
For example, it could be enabled on battery-powered devices where
power efficiency is critical, but disabled on always-connected devices
where low latency is more important.
This change provides the flexibility needed to optimize for different
market segments and user scenarios without requiring driver modifications.
Existing drivers that previously set MMC_CAP_AGGRESSIVE_PM can now
remove those hardcoded settings in favor of device-tree configuration.
Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
---
drivers/mmc/core/host.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index b7ce313..abe61c7 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -400,6 +400,8 @@ int mmc_of_parse(struct mmc_host *host)
if (device_property_read_bool(dev, "no-mmc-hs400"))
host->caps2 &= ~(MMC_CAP2_HS400_1_8V | MMC_CAP2_HS400_1_2V |
MMC_CAP2_HS400_ES);
+ if (device_property_read_bool(dev, "cap-aggressive-pm"))
+ host->caps |= MMC_CAP_AGGRESSIVE_PM;
/* Must be after "non-removable" check */
if (device_property_read_u32(dev, "fixed-emmc-driver-type", &drv_type) == 0) {
--
2.7.4
More information about the Linux-rockchip
mailing list