forked from rubenslte/android_kernel_samsung_msm8226
PM / devfreq: Add a new target flag for the performance governor
The new flag for the devfreq profile->target() function is used by the performance governor to notify the driver that the device should wakeup on the max frequency. Change-Id: I91c2d649177bdd1841a087a2125d1cdbc979f5c1 Signed-off-by: Vladimir Razgulin <vrazguli@codeaurora.org>
This commit is contained in:
committed by
Bryan Huntsman
parent
5b07f2b4b2
commit
4b38963bc6
@@ -32,13 +32,26 @@ static int devfreq_performance_handler(struct devfreq *devfreq,
|
||||
unsigned int event, void *data)
|
||||
{
|
||||
int ret = 0;
|
||||
unsigned long freq;
|
||||
|
||||
if (event == DEVFREQ_GOV_START || event == DEVFREQ_GOV_RESUME) {
|
||||
mutex_lock(&devfreq->lock);
|
||||
mutex_lock(&devfreq->lock);
|
||||
freq = devfreq->previous_freq;
|
||||
switch (event) {
|
||||
case DEVFREQ_GOV_START:
|
||||
devfreq->profile->target(devfreq->dev.parent,
|
||||
&freq,
|
||||
DEVFREQ_FLAG_WAKEUP_MAXFREQ);
|
||||
/* fall through */
|
||||
case DEVFREQ_GOV_RESUME:
|
||||
ret = update_devfreq(devfreq);
|
||||
mutex_unlock(&devfreq->lock);
|
||||
break;
|
||||
case DEVFREQ_GOV_SUSPEND:
|
||||
devfreq->profile->target(devfreq->dev.parent,
|
||||
&freq,
|
||||
DEVFREQ_FLAG_WAKEUP_MAXFREQ);
|
||||
break;
|
||||
}
|
||||
|
||||
mutex_unlock(&devfreq->lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ struct devfreq_dev_status {
|
||||
* bound (greatest lower bound)
|
||||
*/
|
||||
#define DEVFREQ_FLAG_LEAST_UPPER_BOUND 0x1
|
||||
#define DEVFREQ_FLAG_WAKEUP_MAXFREQ 0x2
|
||||
|
||||
#define DEVFREQ_FLAG_FAST_HINT 0x2
|
||||
#define DEVFREQ_FLAG_SLOW_HINT 0x4
|
||||
|
||||
Reference in New Issue
Block a user