[PATCH] scsi: ufs: exynos: call phy_notify_pmstate() from hibern8 callbacks

From: Peter Griffin
Date: Thu Jul 03 2025 - 10:10:03 EST


Notify the ufs phy of the hibern8 link state so that it can program the
appropriate values.

Signed-off-by: Peter Griffin <peter.griffin@xxxxxxxxxx>
---
Note this patch has a dependency on the new API proposed in [1]

[1] https://lore.kernel.org/lkml/20250703-phy-notify-pmstate-v2-0-fc1690439117@xxxxxxxxxx/
---
drivers/ufs/host/ufs-exynos.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c
index 3e545af536e53e06b66c624ed0dc6dc7de13549f..e9fac23dc15abd685aba4c169c82e211040dec8b 100644
--- a/drivers/ufs/host/ufs-exynos.c
+++ b/drivers/ufs/host/ufs-exynos.c
@@ -1574,6 +1574,8 @@ static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd)
exynos_ufs_disable_auto_ctrl_hcc(ufs);
exynos_ufs_ungate_clks(ufs);

+ phy_notify_pmstate(ufs->phy, PHY_UFS_HIBERN8_EXIT);
+
if (ufs->opts & EXYNOS_UFS_OPT_USE_SW_HIBERN8_TIMER) {
static const unsigned int granularity_tbl[] = {
1, 4, 8, 16, 32, 100
@@ -1606,6 +1608,8 @@ static void exynos_ufs_post_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd)
exynos_ufs_gate_clks(ufs);
if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL)
exynos_ufs_enable_auto_ctrl_hcc(ufs);
+
+ phy_notify_pmstate(ufs->phy, PHY_UFS_HIBERN8_ENTER);
}
}


---
base-commit: 4611e0cba12ff5bb64b469cfac129f40f41b5caf
change-id: 20250703-ufs-exynos-phy_notify_pmstate-c0e9db95ac66
prerequisite-change-id: 20250703-phy-notify-pmstate-f02ba5582f65:v2
prerequisite-patch-id: 99070bdd3132b74f7b8932d3d8bef685815a5edd
prerequisite-patch-id: 02cd952ede323864a87816a20e3f6e06b885eab3

Best regards,
--
Peter Griffin <peter.griffin@xxxxxxxxxx>