diff mbox series

[v3,4/5] drivers: power: suspend: call devfreq suspend/resume

Message ID 1544007956-28889-5-git-send-email-l.luba@partner.samsung.com (mailing list archive)
State New, archived
Headers show
Series [v3,1/5] devfreq: refactor set_target frequency function | expand

Commit Message

Lukasz Luba Dec. 5, 2018, 11:05 a.m. UTC
Devfreq framework supports suspend of its devices.
Call the the devfreq interface and allow devfreq devices preserve/restore
their states during suspend/resume.

Suggested-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
---
 drivers/base/power/main.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Lukasz Luba Dec. 13, 2018, 2:35 p.m. UTC | #1
Hi Rafael,

I see that you have pulled 3 patches.
Please take also this patch, which is actually enabling the feature.

Regards,
Lukasz

On 12/5/18 12:05 PM, Lukasz Luba wrote:
> Devfreq framework supports suspend of its devices.
> Call the the devfreq interface and allow devfreq devices preserve/restore
> their states during suspend/resume.
> 
> Suggested-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
> Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
> ---
>   drivers/base/power/main.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
> index a690fd4..0992e67 100644
> --- a/drivers/base/power/main.c
> +++ b/drivers/base/power/main.c
> @@ -32,6 +32,7 @@
>   #include <trace/events/power.h>
>   #include <linux/cpufreq.h>
>   #include <linux/cpuidle.h>
> +#include <linux/devfreq.h>
>   #include <linux/timer.h>
>   
>   #include "../base.h"
> @@ -1078,6 +1079,7 @@ void dpm_resume(pm_message_t state)
>   	dpm_show_time(starttime, state, 0, NULL);
>   
>   	cpufreq_resume();
> +	devfreq_resume();
>   	trace_suspend_resume(TPS("dpm_resume"), state.event, false);
>   }
>   
> @@ -1852,6 +1854,7 @@ int dpm_suspend(pm_message_t state)
>   	trace_suspend_resume(TPS("dpm_suspend"), state.event, true);
>   	might_sleep();
>   
> +	devfreq_suspend();
>   	cpufreq_suspend();
>   
>   	mutex_lock(&dpm_list_mtx);
>
MyungJoo Ham Dec. 21, 2018, 12:33 a.m. UTC | #2
>On 2018-12-05 12:05, Lukasz Luba wrote:
>> Devfreq framework supports suspend of its devices.
>> Call the the devfreq interface and allow devfreq devices preserve/restore
>> their states during suspend/resume.
>>
>> Suggested-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
>> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
>> Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>

This looks all good to me.

Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>

>> ---
>>  drivers/base/power/main.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
>> index a690fd4..0992e67 100644
>> --- a/drivers/base/power/main.c
>> +++ b/drivers/base/power/main.c
>> @@ -32,6 +32,7 @@
>>  #include <trace/events/power.h>
>>  #include <linux/cpufreq.h>
>>  #include <linux/cpuidle.h>
>> +#include <linux/devfreq.h>
>>  #include <linux/timer.h>
>>  
>>  #include "../base.h"
>> @@ -1078,6 +1079,7 @@ void dpm_resume(pm_message_t state)
>>  	dpm_show_time(starttime, state, 0, NULL);
>>  
>>  	cpufreq_resume();
>> +	devfreq_resume();
>>  	trace_suspend_resume(TPS("dpm_resume"), state.event, false);
>>  }
>>  
>> @@ -1852,6 +1854,7 @@ int dpm_suspend(pm_message_t state)
>>  	trace_suspend_resume(TPS("dpm_suspend"), state.event, true);
>>  	might_sleep();
>>  
>> +	devfreq_suspend();
>>  	cpufreq_suspend();
>>  
>>  	mutex_lock(&dpm_list_mtx);
Lukasz Luba Jan. 2, 2019, 3:08 p.m. UTC | #3
Hi Rafael,

Gentle ping...
Please take this patch, it got ACK.
The other patches have been taken through MyungJoo's
tree, but this one is actually enabling the feature.

Regards,
Lukasz


On 12/21/18 1:33 AM, MyungJoo Ham wrote:
>> On 2018-12-05 12:05, Lukasz Luba wrote:
>>> Devfreq framework supports suspend of its devices.
>>> Call the the devfreq interface and allow devfreq devices preserve/restore
>>> their states during suspend/resume.
>>>
>>> Suggested-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
>>> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
>>> Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
> 
> This looks all good to me.
> 
> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> 
>>> ---
>>>   drivers/base/power/main.c | 3 +++
>>>   1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
>>> index a690fd4..0992e67 100644
>>> --- a/drivers/base/power/main.c
>>> +++ b/drivers/base/power/main.c
>>> @@ -32,6 +32,7 @@
>>>   #include <trace/events/power.h>
>>>   #include <linux/cpufreq.h>
>>>   #include <linux/cpuidle.h>
>>> +#include <linux/devfreq.h>
>>>   #include <linux/timer.h>
>>>   
>>>   #include "../base.h"
>>> @@ -1078,6 +1079,7 @@ void dpm_resume(pm_message_t state)
>>>   	dpm_show_time(starttime, state, 0, NULL);
>>>   
>>>   	cpufreq_resume();
>>> +	devfreq_resume();
>>>   	trace_suspend_resume(TPS("dpm_resume"), state.event, false);
>>>   }
>>>   
>>> @@ -1852,6 +1854,7 @@ int dpm_suspend(pm_message_t state)
>>>   	trace_suspend_resume(TPS("dpm_suspend"), state.event, true);
>>>   	might_sleep();
>>>   
>>> +	devfreq_suspend();
>>>   	cpufreq_suspend();
>>>   
>>>   	mutex_lock(&dpm_list_mtx);
> 
>
Rafael J. Wysocki Jan. 3, 2019, 10:08 a.m. UTC | #4
On Wed, Jan 2, 2019 at 4:08 PM Lukasz Luba <l.luba@partner.samsung.com> wrote:
>
> Hi Rafael,
>
> Gentle ping...
> Please take this patch, it got ACK.
> The other patches have been taken through MyungJoo's
> tree, but this one is actually enabling the feature.

Applied now and sorry for missing it.

Thanks!
diff mbox series

Patch

diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index a690fd4..0992e67 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -32,6 +32,7 @@ 
 #include <trace/events/power.h>
 #include <linux/cpufreq.h>
 #include <linux/cpuidle.h>
+#include <linux/devfreq.h>
 #include <linux/timer.h>
 
 #include "../base.h"
@@ -1078,6 +1079,7 @@  void dpm_resume(pm_message_t state)
 	dpm_show_time(starttime, state, 0, NULL);
 
 	cpufreq_resume();
+	devfreq_resume();
 	trace_suspend_resume(TPS("dpm_resume"), state.event, false);
 }
 
@@ -1852,6 +1854,7 @@  int dpm_suspend(pm_message_t state)
 	trace_suspend_resume(TPS("dpm_suspend"), state.event, true);
 	might_sleep();
 
+	devfreq_suspend();
 	cpufreq_suspend();
 
 	mutex_lock(&dpm_list_mtx);