diff mbox series

[v2,2/2] bus: mhi: pm: reduce PM state change verbosity

Message ID 1617700315-12492-2-git-send-email-loic.poulain@linaro.org (mailing list archive)
State Not Applicable, archived
Headers show
Series [v2,1/2] bus: mhi: core: Fix MHI runtime_pm behavior | expand

Commit Message

Loic Poulain April 6, 2021, 9:11 a.m. UTC
Since M3 can be entered/exited quite a lot when used for runtime PM,
keep the mhi suspend/resume transitions quiet.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
---
 v2: Coding style, adjust alignment of dev_dbg params

 drivers/bus/mhi/core/pm.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Manivannan Sadhasivam April 7, 2021, 5:01 a.m. UTC | #1
On Tue, Apr 06, 2021 at 11:11:55AM +0200, Loic Poulain wrote:
> Since M3 can be entered/exited quite a lot when used for runtime PM,
> keep the mhi suspend/resume transitions quiet.
> 
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> Reviewed-by: Bhaumik Bhatt <bbhatt@codeaurora.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> ---
>  v2: Coding style, adjust alignment of dev_dbg params
> 
>  drivers/bus/mhi/core/pm.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/bus/mhi/core/pm.c b/drivers/bus/mhi/core/pm.c
> index edd7794..6cbac21 100644
> --- a/drivers/bus/mhi/core/pm.c
> +++ b/drivers/bus/mhi/core/pm.c
> @@ -858,7 +858,7 @@ int mhi_pm_suspend(struct mhi_controller *mhi_cntrl)
>  		return -EBUSY;
>  	}
>  
> -	dev_info(dev, "Allowing M3 transition\n");
> +	dev_dbg(dev, "Allowing M3 transition\n");
>  	new_state = mhi_tryset_pm_state(mhi_cntrl, MHI_PM_M3_ENTER);
>  	if (new_state != MHI_PM_M3_ENTER) {
>  		write_unlock_irq(&mhi_cntrl->pm_lock);
> @@ -872,7 +872,7 @@ int mhi_pm_suspend(struct mhi_controller *mhi_cntrl)
>  	/* Set MHI to M3 and wait for completion */
>  	mhi_set_mhi_state(mhi_cntrl, MHI_STATE_M3);
>  	write_unlock_irq(&mhi_cntrl->pm_lock);
> -	dev_info(dev, "Wait for M3 completion\n");
> +	dev_dbg(dev, "Wait for M3 completion\n");

This could be "Waiting for M3 completion". But I'll change it while
applying.

Thanks,
Mani

>  
>  	ret = wait_event_timeout(mhi_cntrl->state_event,
>  				 mhi_cntrl->dev_state == MHI_STATE_M3 ||
> @@ -906,9 +906,9 @@ int mhi_pm_resume(struct mhi_controller *mhi_cntrl)
>  	enum mhi_pm_state cur_state;
>  	int ret;
>  
> -	dev_info(dev, "Entered with PM state: %s, MHI state: %s\n",
> -		 to_mhi_pm_state_str(mhi_cntrl->pm_state),
> -		 TO_MHI_STATE_STR(mhi_cntrl->dev_state));
> +	dev_dbg(dev, "Entered with PM state: %s, MHI state: %s\n",
> +		to_mhi_pm_state_str(mhi_cntrl->pm_state),
> +		TO_MHI_STATE_STR(mhi_cntrl->dev_state));
>  
>  	if (mhi_cntrl->pm_state == MHI_PM_DISABLE)
>  		return 0;
> -- 
> 2.7.4
>
Manivannan Sadhasivam April 7, 2021, 6:50 a.m. UTC | #2
On Tue, Apr 06, 2021 at 11:11:55AM +0200, Loic Poulain wrote:
> Since M3 can be entered/exited quite a lot when used for runtime PM,
> keep the mhi suspend/resume transitions quiet.
> 
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> Reviewed-by: Bhaumik Bhatt <bbhatt@codeaurora.org>

Applied to mhi-next!

Thanks,
Mani

> ---
>  v2: Coding style, adjust alignment of dev_dbg params
> 
>  drivers/bus/mhi/core/pm.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/bus/mhi/core/pm.c b/drivers/bus/mhi/core/pm.c
> index edd7794..6cbac21 100644
> --- a/drivers/bus/mhi/core/pm.c
> +++ b/drivers/bus/mhi/core/pm.c
> @@ -858,7 +858,7 @@ int mhi_pm_suspend(struct mhi_controller *mhi_cntrl)
>  		return -EBUSY;
>  	}
>  
> -	dev_info(dev, "Allowing M3 transition\n");
> +	dev_dbg(dev, "Allowing M3 transition\n");
>  	new_state = mhi_tryset_pm_state(mhi_cntrl, MHI_PM_M3_ENTER);
>  	if (new_state != MHI_PM_M3_ENTER) {
>  		write_unlock_irq(&mhi_cntrl->pm_lock);
> @@ -872,7 +872,7 @@ int mhi_pm_suspend(struct mhi_controller *mhi_cntrl)
>  	/* Set MHI to M3 and wait for completion */
>  	mhi_set_mhi_state(mhi_cntrl, MHI_STATE_M3);
>  	write_unlock_irq(&mhi_cntrl->pm_lock);
> -	dev_info(dev, "Wait for M3 completion\n");
> +	dev_dbg(dev, "Wait for M3 completion\n");
>  
>  	ret = wait_event_timeout(mhi_cntrl->state_event,
>  				 mhi_cntrl->dev_state == MHI_STATE_M3 ||
> @@ -906,9 +906,9 @@ int mhi_pm_resume(struct mhi_controller *mhi_cntrl)
>  	enum mhi_pm_state cur_state;
>  	int ret;
>  
> -	dev_info(dev, "Entered with PM state: %s, MHI state: %s\n",
> -		 to_mhi_pm_state_str(mhi_cntrl->pm_state),
> -		 TO_MHI_STATE_STR(mhi_cntrl->dev_state));
> +	dev_dbg(dev, "Entered with PM state: %s, MHI state: %s\n",
> +		to_mhi_pm_state_str(mhi_cntrl->pm_state),
> +		TO_MHI_STATE_STR(mhi_cntrl->dev_state));
>  
>  	if (mhi_cntrl->pm_state == MHI_PM_DISABLE)
>  		return 0;
> -- 
> 2.7.4
>
diff mbox series

Patch

diff --git a/drivers/bus/mhi/core/pm.c b/drivers/bus/mhi/core/pm.c
index edd7794..6cbac21 100644
--- a/drivers/bus/mhi/core/pm.c
+++ b/drivers/bus/mhi/core/pm.c
@@ -858,7 +858,7 @@  int mhi_pm_suspend(struct mhi_controller *mhi_cntrl)
 		return -EBUSY;
 	}
 
-	dev_info(dev, "Allowing M3 transition\n");
+	dev_dbg(dev, "Allowing M3 transition\n");
 	new_state = mhi_tryset_pm_state(mhi_cntrl, MHI_PM_M3_ENTER);
 	if (new_state != MHI_PM_M3_ENTER) {
 		write_unlock_irq(&mhi_cntrl->pm_lock);
@@ -872,7 +872,7 @@  int mhi_pm_suspend(struct mhi_controller *mhi_cntrl)
 	/* Set MHI to M3 and wait for completion */
 	mhi_set_mhi_state(mhi_cntrl, MHI_STATE_M3);
 	write_unlock_irq(&mhi_cntrl->pm_lock);
-	dev_info(dev, "Wait for M3 completion\n");
+	dev_dbg(dev, "Wait for M3 completion\n");
 
 	ret = wait_event_timeout(mhi_cntrl->state_event,
 				 mhi_cntrl->dev_state == MHI_STATE_M3 ||
@@ -906,9 +906,9 @@  int mhi_pm_resume(struct mhi_controller *mhi_cntrl)
 	enum mhi_pm_state cur_state;
 	int ret;
 
-	dev_info(dev, "Entered with PM state: %s, MHI state: %s\n",
-		 to_mhi_pm_state_str(mhi_cntrl->pm_state),
-		 TO_MHI_STATE_STR(mhi_cntrl->dev_state));
+	dev_dbg(dev, "Entered with PM state: %s, MHI state: %s\n",
+		to_mhi_pm_state_str(mhi_cntrl->pm_state),
+		TO_MHI_STATE_STR(mhi_cntrl->dev_state));
 
 	if (mhi_cntrl->pm_state == MHI_PM_DISABLE)
 		return 0;