diff options
author | Peter Wang <peter.wang@mediatek.com> | 2021-10-06 07:47:05 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-12 19:41:01 +0200 |
commit | 9561f58442e48c3c71da250aa63bd02ec6bffcb5 (patch) | |
tree | d642e16c9f26b6f8cb8df7c1c7bbcbb6f49ad073 /drivers/scsi/ufs/ufs-qcom.c | |
parent | scsi: csiostor: Uninitialized data in csio_ln_vnp_read_cbfn() (diff) | |
download | linux-9561f58442e48c3c71da250aa63bd02ec6bffcb5.tar.xz linux-9561f58442e48c3c71da250aa63bd02ec6bffcb5.zip |
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-qcom.c')
-rw-r--r-- | drivers/scsi/ufs/ufs-qcom.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c index 92f5bb4965fa..0d2e950d0865 100644 --- a/drivers/scsi/ufs/ufs-qcom.c +++ b/drivers/scsi/ufs/ufs-qcom.c @@ -589,11 +589,15 @@ static void ufs_qcom_device_reset_ctrl(struct ufs_hba *hba, bool asserted) gpiod_set_value_cansleep(host->device_reset, asserted); } -static int ufs_qcom_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op) +static int ufs_qcom_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op, + enum ufs_notify_change_status status) { struct ufs_qcom_host *host = ufshcd_get_variant(hba); struct phy *phy = host->generic_phy; + if (status == PRE_CHANGE) + return 0; + if (ufs_qcom_is_link_off(hba)) { /* * Disable the tx/rx lane symbol clocks before PHY is |