Fix mmc1 microSD initialization with sdhci-msm HPM/LPM regulator_set_load
- Update drivers/mmc/host/sdhci-msm.c in patch 0012 so sdhci_msm_register_vreg(), sdhci_msm_set_vmmc(), msm_toggle_vqmmc(), and sdhci_msm_runtime_resume() vote 200 mA vmmc / 20 mA vqmmc HPM loads during probe, card init, and UHS-I tuning while sdhci_msm_runtime_suspend() drops vmmc/vqmmc to 2 mA / 0 mA LPM - Rebuild vmlinuz/modules/DTBs via scripts/build-kernel-audio.sh and sync prebuilt/ and overlay/rootfs/ artifacts - Guard sdhci-msm regulator_set_load hunks in scripts/check-rebuild.sh, document the fix in BATTERY-OPTIMIZATION-ANALYSIS.md, AGENTS.md, and Unreleased CHANGELOG.md notes, and update rebuilt --mkinitfs image SHA-256 checksums across all four targets (verified live on Nokia 2720)
This commit is contained in:
1 parent
c9eb28b891
commit
601aaca25c
9 files changed
+26739
-26707
No files matched your search
@@ -15,29 +15,57 @@ index f5d66cc5d..feaed79f1 100644
|
||||
|
||||
static const struct drm_simple_display_pipe_funcs panel_mipi_dbi_pipe_funcs = {
|
||||
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
|
||||
index e113b99a3..4dd967439 100644
|
||||
--- a/drivers/mmc/host/sdhci-msm.c
|
||||
+++ b/drivers/mmc/host/sdhci-msm.c
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <linux/mmc/mmc.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/pm_opp.h>
|
||||
+#include <linux/regulator/consumer.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
@@ -2704,6 +2705,10 @@ static __maybe_unused int sdhci_msm_runtime_suspend(struct device *dev)
|
||||
@@ -1408,6 +1408,7 @@
|
||||
if (IS_ERR(mmc->supply.vmmc))
|
||||
return 0;
|
||||
|
||||
+ regulator_set_load(mmc->supply.vmmc, mmc->ios.vdd ? 200000 : 0);
|
||||
return mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, mmc->ios.vdd);
|
||||
}
|
||||
|
||||
@@ -1421,6 +1422,7 @@
|
||||
return 0;
|
||||
|
||||
if (level) {
|
||||
+ regulator_set_load(mmc->supply.vqmmc, 20000);
|
||||
/* Set the IO voltage regulator to default voltage level */
|
||||
if (msm_host->caps_0 & CORE_3_0V_SUPPORT)
|
||||
ios.signal_voltage = MMC_SIGNAL_VOLTAGE_330;
|
||||
@@ -1438,6 +1440,8 @@
|
||||
ret = regulator_enable(mmc->supply.vqmmc);
|
||||
} else {
|
||||
ret = regulator_disable(mmc->supply.vqmmc);
|
||||
+ if (!ret)
|
||||
+ regulator_set_load(mmc->supply.vqmmc, 0);
|
||||
}
|
||||
|
||||
if (ret)
|
||||
@@ -2188,6 +2192,11 @@
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ if (!IS_ERR(msm_host->mmc->supply.vmmc))
|
||||
+ regulator_set_load(msm_host->mmc->supply.vmmc, 200000);
|
||||
+ if (!IS_ERR(msm_host->mmc->supply.vqmmc))
|
||||
+ regulator_set_load(msm_host->mmc->supply.vqmmc, 20000);
|
||||
+
|
||||
sdhci_msm_set_regulator_caps(msm_host);
|
||||
|
||||
return 0;
|
||||
@@ -2704,6 +2713,10 @@
|
||||
dev_pm_opp_set_rate(dev, 0);
|
||||
clk_bulk_disable_unprepare(ARRAY_SIZE(msm_host->bulk_clks),
|
||||
msm_host->bulk_clks);
|
||||
+ if (!IS_ERR(host->mmc->supply.vmmc))
|
||||
+ regulator_set_load(host->mmc->supply.vmmc, 0);
|
||||
+ regulator_set_load(host->mmc->supply.vmmc, 2000);
|
||||
+ if (!IS_ERR(host->mmc->supply.vqmmc))
|
||||
+ regulator_set_load(host->mmc->supply.vqmmc, 0);
|
||||
|
||||
return sdhci_msm_ice_suspend(msm_host);
|
||||
}
|
||||
@@ -2716,6 +2721,11 @@ static __maybe_unused int sdhci_msm_runtime_resume(struct device *dev)
|
||||
@@ -2716,6 +2729,11 @@
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
|
||||
Reference in new issue
Block a user