mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
cpufreq: distinguish drivers that do asynchronous notifications
There are few special cases like exynos5440 which doesn't send POSTCHANGE notification from their ->target() routine and call some kind of bottom halves for doing this work, work/tasklet/etc.. From which they finally send POSTCHANGE notification. Its better if we distinguish them from other cpufreq drivers in some way so that core can handle them specially. So this patch introduces another flag: CPUFREQ_ASYNC_NOTIFICATION, which will be set by such drivers. This also changes exynos5440-cpufreq.c and powernow-k8 in order to set this flag. Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Git-commit: 7dbf694db6ac7c759599316d50d7050efcbd512a Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git [junjiew@codeaurora.org: resolve trivial merge conflicts] Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
This commit is contained in:
parent
4d0f60f2c7
commit
a6a7321205
3 changed files with 9 additions and 1 deletions
|
@ -339,7 +339,7 @@ static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
|||
}
|
||||
|
||||
static struct cpufreq_driver exynos_driver = {
|
||||
.flags = CPUFREQ_STICKY,
|
||||
.flags = CPUFREQ_STICKY | CPUFREQ_ASYNC_NOTIFICATION,
|
||||
.verify = exynos_verify_speed,
|
||||
.target = exynos_target,
|
||||
.get = exynos_getspeed,
|
||||
|
|
|
@ -1233,6 +1233,7 @@ static struct freq_attr *powernow_k8_attr[] = {
|
|||
};
|
||||
|
||||
static struct cpufreq_driver cpufreq_amd64_driver = {
|
||||
.flags = CPUFREQ_ASYNC_NOTIFICATION,
|
||||
.verify = powernowk8_verify,
|
||||
.target = powernowk8_target,
|
||||
.bios_limit = acpi_processor_get_bios_limit,
|
||||
|
|
|
@ -237,6 +237,13 @@ struct cpufreq_driver {
|
|||
*/
|
||||
#define CPUFREQ_HAVE_GOVERNOR_PER_POLICY (1 << 3)
|
||||
|
||||
/*
|
||||
* Driver will do POSTCHANGE notifications from outside of their ->target()
|
||||
* routine and so must set cpufreq_driver->flags with this flag, so that core
|
||||
* can handle them specially.
|
||||
*/
|
||||
#define CPUFREQ_ASYNC_NOTIFICATION (1 << 4)
|
||||
|
||||
int cpufreq_register_driver(struct cpufreq_driver *driver_data);
|
||||
int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
|
||||
|
||||
|
|
Loading…
Reference in a new issue