Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 4070a4773ac8ac3d871c8293906c77469ced89ef Mon Sep 17 00:00:00 2001
- From: Pranav Vashi <neobuddy89@gmail.com>
- Date: Sat, 18 Apr 2015 11:39:52 +0530
- Subject: [PATCH] cpufreq: cpu-boost: Export cpu boost status
- Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
- ---
- drivers/cpufreq/cpu-boost.c | 10 ++++++++++
- include/linux/cpu.h | 2 ++
- 2 files changed, 12 insertions(+)
- diff --git a/drivers/cpufreq/cpu-boost.c b/drivers/cpufreq/cpu-boost.c
- index 0a80399..1be1c08 100644
- --- a/drivers/cpufreq/cpu-boost.c
- +++ b/drivers/cpufreq/cpu-boost.c
- @@ -263,6 +263,16 @@ static void cpuboost_input_event(struct input_handle *handle,
- last_input_time = ktime_to_us(ktime_get());
- }
- +bool check_cpuboost(int cpu)
- +{
- + struct cpu_sync *i_sync_info;
- + i_sync_info = &per_cpu(sync_info, cpu);
- +
- + if (i_sync_info->input_boost_min > 0)
- + return true;
- + return false;
- +}
- +
- static int cpuboost_input_connect(struct input_handler *handler,
- struct input_dev *dev, const struct input_device_id *id)
- {
- diff --git a/include/linux/cpu.h b/include/linux/cpu.h
- index 92f9fcd..4ed0d64 100644
- --- a/include/linux/cpu.h
- +++ b/include/linux/cpu.h
- @@ -224,4 +224,6 @@ void idle_notifier_register(struct notifier_block *n);
- void idle_notifier_unregister(struct notifier_block *n);
- void idle_notifier_call_chain(unsigned long val);
- +extern bool check_cpuboost(int cpu);
- +
- #endif /* _LINUX_CPU_H_ */
- --
- 2.5.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement