Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. From 4070a4773ac8ac3d871c8293906c77469ced89ef Mon Sep 17 00:00:00 2001
  2. From: Pranav Vashi <neobuddy89@gmail.com>
  3. Date: Sat, 18 Apr 2015 11:39:52 +0530
  4. Subject: [PATCH] cpufreq: cpu-boost: Export cpu boost status
  5.  
  6. Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
  7. ---
  8. drivers/cpufreq/cpu-boost.c | 10 ++++++++++
  9. include/linux/cpu.h | 2 ++
  10. 2 files changed, 12 insertions(+)
  11.  
  12. diff --git a/drivers/cpufreq/cpu-boost.c b/drivers/cpufreq/cpu-boost.c
  13. index 0a80399..1be1c08 100644
  14. --- a/drivers/cpufreq/cpu-boost.c
  15. +++ b/drivers/cpufreq/cpu-boost.c
  16. @@ -263,6 +263,16 @@ static void cpuboost_input_event(struct input_handle *handle,
  17. last_input_time = ktime_to_us(ktime_get());
  18. }
  19.  
  20. +bool check_cpuboost(int cpu)
  21. +{
  22. + struct cpu_sync *i_sync_info;
  23. + i_sync_info = &per_cpu(sync_info, cpu);
  24. +
  25. + if (i_sync_info->input_boost_min > 0)
  26. + return true;
  27. + return false;
  28. +}
  29. +
  30. static int cpuboost_input_connect(struct input_handler *handler,
  31. struct input_dev *dev, const struct input_device_id *id)
  32. {
  33. diff --git a/include/linux/cpu.h b/include/linux/cpu.h
  34. index 92f9fcd..4ed0d64 100644
  35. --- a/include/linux/cpu.h
  36. +++ b/include/linux/cpu.h
  37. @@ -224,4 +224,6 @@ void idle_notifier_register(struct notifier_block *n);
  38. void idle_notifier_unregister(struct notifier_block *n);
  39. void idle_notifier_call_chain(unsigned long val);
  40.  
  41. +extern bool check_cpuboost(int cpu);
  42. +
  43. #endif /* _LINUX_CPU_H_ */
  44. --
  45. 2.5.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement