diff mbox series

[23/28] drivers: usb: Call cpu_latency_qos_*() instead of pm_qos_*()

Message ID 19064076.ICumzjfW0v@kreacher (mailing list archive)
State Deferred
Headers show
Series PM: QoS: Get rid of unuseful code and rework CPU latency QoS interface | expand

Commit Message

Rafael J. Wysocki Feb. 11, 2020, 11:28 p.m. UTC
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>

Call cpu_latency_qos_add/remove_request() instead of
pm_qos_add/remove_request(), respectively, because the
latter are going to be dropped.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/usb/chipidea/ci_hdrc_imx.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

Comments

Greg KH Feb. 12, 2020, 6:38 p.m. UTC | #1
On Wed, Feb 12, 2020 at 12:28:44AM +0100, Rafael J. Wysocki wrote:
> From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> 
> Call cpu_latency_qos_add/remove_request() instead of
> pm_qos_add/remove_request(), respectively, because the
> latter are going to be dropped.
> 
> No intentional functional impact.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  drivers/usb/chipidea/ci_hdrc_imx.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Chen Feb. 18, 2020, 8:03 a.m. UTC | #2
On 20-02-12 10:38:27, Greg KH wrote:
> On Wed, Feb 12, 2020 at 12:28:44AM +0100, Rafael J. Wysocki wrote:
> > From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> > 
> > Call cpu_latency_qos_add/remove_request() instead of
> > pm_qos_add/remove_request(), respectively, because the
> > latter are going to be dropped.
> > 
> > No intentional functional impact.
> > 
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > ---
> >  drivers/usb/chipidea/ci_hdrc_imx.c | 12 +++++-------
> >  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Hi Greg,

With this patch applied, the usb-next can't compile pass.
Greg KH Feb. 18, 2020, 8:08 a.m. UTC | #3
On Tue, Feb 18, 2020 at 08:03:13AM +0000, Peter Chen wrote:
> On 20-02-12 10:38:27, Greg KH wrote:
> > On Wed, Feb 12, 2020 at 12:28:44AM +0100, Rafael J. Wysocki wrote:
> > > From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> > > 
> > > Call cpu_latency_qos_add/remove_request() instead of
> > > pm_qos_add/remove_request(), respectively, because the
> > > latter are going to be dropped.
> > > 
> > > No intentional functional impact.
> > > 
> > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > > ---
> > >  drivers/usb/chipidea/ci_hdrc_imx.c | 12 +++++-------
> > >  1 file changed, 5 insertions(+), 7 deletions(-)
> > 
> > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> Hi Greg,
> 
> With this patch applied, the usb-next can't compile pass.

Did I apply this?  It looks to need to go through Rafael's tree which
introduces the new api, right?

thanks,

greg k-h
Peter Chen Feb. 18, 2020, 8:11 a.m. UTC | #4
> 
> On Tue, Feb 18, 2020 at 08:03:13AM +0000, Peter Chen wrote:
> > On 20-02-12 10:38:27, Greg KH wrote:
> > > On Wed, Feb 12, 2020 at 12:28:44AM +0100, Rafael J. Wysocki wrote:
> > > > From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> > > >
> > > > Call cpu_latency_qos_add/remove_request() instead of
> > > > pm_qos_add/remove_request(), respectively, because the latter are
> > > > going to be dropped.
> > > >
> > > > No intentional functional impact.
> > > >
> > > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > > > ---
> > > >  drivers/usb/chipidea/ci_hdrc_imx.c | 12 +++++-------
> > > >  1 file changed, 5 insertions(+), 7 deletions(-)
> > >
> > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >
> > Hi Greg,
> >
> > With this patch applied, the usb-next can't compile pass.
> 
> Did I apply this?  It looks to need to go through Rafael's tree which introduces the
> new api, right?
> 

Not yet, I just try it at my local for my chipidea tree.

Peter
Peter Chen Feb. 19, 2020, 1:09 a.m. UTC | #5
On 20-02-12 00:28:44, Rafael J. Wysocki wrote:
> From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> 
> Call cpu_latency_qos_add/remove_request() instead of
> pm_qos_add/remove_request(), respectively, because the
> latter are going to be dropped.
> 
> No intentional functional impact.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  drivers/usb/chipidea/ci_hdrc_imx.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
> index d8e7eb2f97b9..a479af3ae31d 100644
> --- a/drivers/usb/chipidea/ci_hdrc_imx.c
> +++ b/drivers/usb/chipidea/ci_hdrc_imx.c
> @@ -393,8 +393,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
>  	}
>  
>  	if (pdata.flags & CI_HDRC_PMQOS)
> -		pm_qos_add_request(&data->pm_qos_req,
> -			PM_QOS_CPU_DMA_LATENCY, 0);
> +		cpu_latency_qos_add_request(&data->pm_qos_req, 0);
>  
>  	ret = imx_get_clks(dev);
>  	if (ret)
> @@ -478,7 +477,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
>  		/* don't overwrite original ret (cf. EPROBE_DEFER) */
>  		regulator_disable(data->hsic_pad_regulator);
>  	if (pdata.flags & CI_HDRC_PMQOS)
> -		pm_qos_remove_request(&data->pm_qos_req);
> +		cpu_latency_qos_remove_request(&data->pm_qos_req);
>  	data->ci_pdev = NULL;
>  	return ret;
>  }
> @@ -499,7 +498,7 @@ static int ci_hdrc_imx_remove(struct platform_device *pdev)
>  	if (data->ci_pdev) {
>  		imx_disable_unprepare_clks(&pdev->dev);
>  		if (data->plat_data->flags & CI_HDRC_PMQOS)
> -			pm_qos_remove_request(&data->pm_qos_req);
> +			cpu_latency_qos_remove_request(&data->pm_qos_req);
>  		if (data->hsic_pad_regulator)
>  			regulator_disable(data->hsic_pad_regulator);
>  	}
> @@ -527,7 +526,7 @@ static int __maybe_unused imx_controller_suspend(struct device *dev)
>  
>  	imx_disable_unprepare_clks(dev);
>  	if (data->plat_data->flags & CI_HDRC_PMQOS)
> -		pm_qos_remove_request(&data->pm_qos_req);
> +		cpu_latency_qos_remove_request(&data->pm_qos_req);
>  
>  	data->in_lpm = true;
>  
> @@ -547,8 +546,7 @@ static int __maybe_unused imx_controller_resume(struct device *dev)
>  	}
>  
>  	if (data->plat_data->flags & CI_HDRC_PMQOS)
> -		pm_qos_add_request(&data->pm_qos_req,
> -			PM_QOS_CPU_DMA_LATENCY, 0);
> +		cpu_latency_qos_add_request(&data->pm_qos_req, 0);
>  
>  	ret = imx_prepare_enable_clks(dev);
>  	if (ret)
> -- 
> 2.16.4
> 

Acked-by: Peter Chen <peter.chen@nxp.com>
diff mbox series

Patch

diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index d8e7eb2f97b9..a479af3ae31d 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -393,8 +393,7 @@  static int ci_hdrc_imx_probe(struct platform_device *pdev)
 	}
 
 	if (pdata.flags & CI_HDRC_PMQOS)
-		pm_qos_add_request(&data->pm_qos_req,
-			PM_QOS_CPU_DMA_LATENCY, 0);
+		cpu_latency_qos_add_request(&data->pm_qos_req, 0);
 
 	ret = imx_get_clks(dev);
 	if (ret)
@@ -478,7 +477,7 @@  static int ci_hdrc_imx_probe(struct platform_device *pdev)
 		/* don't overwrite original ret (cf. EPROBE_DEFER) */
 		regulator_disable(data->hsic_pad_regulator);
 	if (pdata.flags & CI_HDRC_PMQOS)
-		pm_qos_remove_request(&data->pm_qos_req);
+		cpu_latency_qos_remove_request(&data->pm_qos_req);
 	data->ci_pdev = NULL;
 	return ret;
 }
@@ -499,7 +498,7 @@  static int ci_hdrc_imx_remove(struct platform_device *pdev)
 	if (data->ci_pdev) {
 		imx_disable_unprepare_clks(&pdev->dev);
 		if (data->plat_data->flags & CI_HDRC_PMQOS)
-			pm_qos_remove_request(&data->pm_qos_req);
+			cpu_latency_qos_remove_request(&data->pm_qos_req);
 		if (data->hsic_pad_regulator)
 			regulator_disable(data->hsic_pad_regulator);
 	}
@@ -527,7 +526,7 @@  static int __maybe_unused imx_controller_suspend(struct device *dev)
 
 	imx_disable_unprepare_clks(dev);
 	if (data->plat_data->flags & CI_HDRC_PMQOS)
-		pm_qos_remove_request(&data->pm_qos_req);
+		cpu_latency_qos_remove_request(&data->pm_qos_req);
 
 	data->in_lpm = true;
 
@@ -547,8 +546,7 @@  static int __maybe_unused imx_controller_resume(struct device *dev)
 	}
 
 	if (data->plat_data->flags & CI_HDRC_PMQOS)
-		pm_qos_add_request(&data->pm_qos_req,
-			PM_QOS_CPU_DMA_LATENCY, 0);
+		cpu_latency_qos_add_request(&data->pm_qos_req, 0);
 
 	ret = imx_prepare_enable_clks(dev);
 	if (ret)