diff options
author | Peter Wang <peter.wang@mediatek.com> | 2021-10-06 13:47:05 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-12 13:41:01 -0400 |
commit | 9561f58442e48c3c71da250aa63bd02ec6bffcb5 (patch) | |
tree | d642e16c9f26b6f8cb8df7c1c7bbcbb6f49ad073 /drivers/scsi/ufs/ufs-exynos.c | |
parent | f4875d509a0a78ad294a1a538d534b5ba94e685a (diff) | |
download | linux-9561f58442e48c3c71da250aa63bd02ec6bffcb5.tar.bz2 |
scsi: ufs: mediatek: Support vops pre suspend to disable auto-hibern8
Mediatek UFS needs auto-hibern8 disabled before suspend. Introduce a
solution to do pre-suspend before SSU (sleep).
Link: https://lore.kernel.org/r/20211006054705.21885-1-peter.wang@mediatek.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufs-exynos.c')
-rw-r--r-- | drivers/scsi/ufs/ufs-exynos.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index a14dd8ce56d4..b2ec9e20b14d 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -1176,10 +1176,14 @@ static void exynos_ufs_hibern8_notify(struct ufs_hba *hba, } } -static int exynos_ufs_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op) +static int exynos_ufs_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op, + enum ufs_notify_change_status status) { struct exynos_ufs *ufs = ufshcd_get_variant(hba); + if (status == PRE_CHANGE) + return 0; + if (!ufshcd_is_link_active(hba)) phy_power_off(ufs->phy); |