Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 463643b6 authored by Vladimir Razgulin's avatar Vladimir Razgulin
Browse files

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: default avatarVladimir Razgulin <vrazguli@codeaurora.org>
parent 7b6446cc
Loading
Loading
Loading
Loading
+17 −4
Original line number Diff line number Diff line
@@ -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);
	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;
}

+1 −0
Original line number Diff line number Diff line
@@ -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