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

Commit fa9aa2be authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "PM / devfreq: Add a new target flag for the performance governor"

parents 4716bf85 463643b6
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