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

Commit ee974af4 authored by Amar Singhal's avatar Amar Singhal Committed by Stephen Boyd
Browse files

cpufreq: make the "scaling_cur_freq" sysfs entry pollable



Wakeup userspace poll on change of cpu frequency. The userspace
may then take action to change the power/performance
characteristics of the device.

Change-Id: I3030b22084fe7e0143b978a198ddcc579e7d6e83
Signed-off-by: default avatarAmar Singhal <asinghal@codeaurora.org>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 187dd1a2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -290,8 +290,10 @@ void __cpufreq_notify_transition(struct cpufreq_policy *policy,
		trace_cpu_frequency(freqs->new, freqs->cpu);
		srcu_notifier_call_chain(&cpufreq_transition_notifier_list,
				CPUFREQ_POSTCHANGE, freqs);
		if (likely(policy) && likely(policy->cpu == freqs->cpu))
		if (likely(policy) && likely(policy->cpu == freqs->cpu)) {
			policy->cur = freqs->new;
			sysfs_notify(&policy->kobj, NULL, "scaling_cur_freq");
		}
		break;
	}
}