[PATCH v3 04/10] ufs: host: mediatek: Correct resume flow for LPM and MTCMOS
peter.wang at mediatek.com
peter.wang at mediatek.com
Tue Sep 2 19:44:40 PDT 2025
From: Alice Chao <alice.chao at mediatek.com>
Correct the system resume flow by turning MTCMOS on before setting
LPM to false. During system suspend, set LPM to true and turn
MTCMOS off. Ensure proper power management and system stability
with the updated resume sequence.
Signed-off-by: Peter Wang <peter.wang at mediatek.com>
Signed-off-by: Alice Chao <alice.chao at mediatek.com>
Reviewed-by: Peter Wang <peter.wang at mediatek.com>
---
drivers/ufs/host/ufs-mediatek.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
index d762f096e32e..a47713a047c1 100644
--- a/drivers/ufs/host/ufs-mediatek.c
+++ b/drivers/ufs/host/ufs-mediatek.c
@@ -2327,11 +2327,11 @@ static int ufs_mtk_system_resume(struct device *dev)
if (pm_runtime_suspended(hba->dev))
goto out;
- ufs_mtk_dev_vreg_set_lpm(hba, false);
-
if (ufs_mtk_is_rtff_mtcmos(hba))
ufs_mtk_mtcmos_ctrl(true, res);
+ ufs_mtk_dev_vreg_set_lpm(hba, false);
+
out:
ret = ufshcd_system_resume(dev);
--
2.45.2
More information about the Linux-mediatek
mailing list