PM / devfreq: predef governors update freq when device is resumed
The predefined performance and powersave governors set the device frequency on their startup only. That's not enough because the frequency might have changed after device suspend-resume. With this fix the governors re-set the required device frequency every time a device get resumed. Change-Id: I47ac877fc9e2cfbfc4a46cc676d6f2f838cd41d6 Signed-off-by: Vladimir Razgulin <vrazguli@codeaurora.org>
This commit is contained in:
parent
4c5ca5ed5b
commit
b6c9810e96
2 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ static int devfreq_performance_handler(struct devfreq *devfreq,
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
if (event == DEVFREQ_GOV_START) {
|
||||
if (event == DEVFREQ_GOV_START || event == DEVFREQ_GOV_RESUME) {
|
||||
mutex_lock(&devfreq->lock);
|
||||
ret = update_devfreq(devfreq);
|
||||
mutex_unlock(&devfreq->lock);
|
||||
|
|
|
@ -29,7 +29,7 @@ static int devfreq_powersave_handler(struct devfreq *devfreq,
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
if (event == DEVFREQ_GOV_START) {
|
||||
if (event == DEVFREQ_GOV_START || event == DEVFREQ_GOV_RESUME) {
|
||||
mutex_lock(&devfreq->lock);
|
||||
ret = update_devfreq(devfreq);
|
||||
mutex_unlock(&devfreq->lock);
|
||||
|
|
Loading…
Add table
Reference in a new issue