cpufreq: add CPUFREQ_INCOMPATIBLE event in policy notifiers

Add support for CPUFREQ_INCOMPATIBLE event in policy notifiers
this event is added for thermal driver, to make sure thermal
is the last client in applying the policy limits.

Change-Id: I392e4745957829dd923f1f40201ad5c6b8ccf006
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
This commit is contained in:
Santosh Mardi 2019-09-13 17:36:30 +05:30
parent ce8bff17a1
commit 12692938e9
2 changed files with 5 additions and 0 deletions

View file

@ -2260,6 +2260,10 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy,
blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
CPUFREQ_ADJUST, new_policy);
/* adjust if necessary - hardware incompatibility */
blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
CPUFREQ_INCOMPATIBLE, new_policy);
/*
* verify the cpu speed can be set within this limit, which might be
* different to the first one

View file

@ -429,6 +429,7 @@ static inline void cpufreq_resume(void) {}
/* Policy Notifiers */
#define CPUFREQ_ADJUST (0)
#define CPUFREQ_NOTIFY (1)
#define CPUFREQ_INCOMPATIBLE (6)
#ifdef CONFIG_CPU_FREQ
int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);