diff mbox series

[v2,5/5] scsi: ufs: qcom: Enable RPM_AUTOSUSPEND for runtime PM

Message ID 20220423140245.394092-6-manivannan.sadhasivam@linaro.org (mailing list archive)
State Superseded
Headers show
Series Qcom UFS driver updates | expand

Commit Message

Manivannan Sadhasivam April 23, 2022, 2:02 p.m. UTC
In order to allow the block devices to enter autosuspend mode during
runtime, thereby allowing the ufshcd host driver to also runtime suspend,
let's make use of the RPM_AUTOSUSPEND flag.

Without this flag, userspace needs to enable the autosuspend feature of
the block devices through sysfs.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/scsi/ufs/ufs-qcom.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Bjorn Andersson April 23, 2022, 3:20 p.m. UTC | #1
On Sat 23 Apr 07:02 PDT 2022, Manivannan Sadhasivam wrote:

> In order to allow the block devices to enter autosuspend mode during
> runtime, thereby allowing the ufshcd host driver to also runtime suspend,
> let's make use of the RPM_AUTOSUSPEND flag.
> 
> Without this flag, userspace needs to enable the autosuspend feature of
> the block devices through sysfs.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---
>  drivers/scsi/ufs/ufs-qcom.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
> index f47a16b7cff5..34c5970db445 100644
> --- a/drivers/scsi/ufs/ufs-qcom.c
> +++ b/drivers/scsi/ufs/ufs-qcom.c
> @@ -876,6 +876,7 @@ static void ufs_qcom_set_caps(struct ufs_hba *hba)
>  	hba->caps |= UFSHCD_CAP_WB_EN;
>  	hba->caps |= UFSHCD_CAP_CRYPTO;
>  	hba->caps |= UFSHCD_CAP_AGGR_POWER_COLLAPSE;
> +	hba->caps |= UFSHCD_CAP_RPM_AUTOSUSPEND;
>  
>  	if (host->hw_ver.major >= 0x2) {
>  		host->caps = UFS_QCOM_CAP_QUNIPRO |
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index f47a16b7cff5..34c5970db445 100644
--- a/drivers/scsi/ufs/ufs-qcom.c
+++ b/drivers/scsi/ufs/ufs-qcom.c
@@ -876,6 +876,7 @@  static void ufs_qcom_set_caps(struct ufs_hba *hba)
 	hba->caps |= UFSHCD_CAP_WB_EN;
 	hba->caps |= UFSHCD_CAP_CRYPTO;
 	hba->caps |= UFSHCD_CAP_AGGR_POWER_COLLAPSE;
+	hba->caps |= UFSHCD_CAP_RPM_AUTOSUSPEND;
 
 	if (host->hw_ver.major >= 0x2) {
 		host->caps = UFS_QCOM_CAP_QUNIPRO |