aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2012-05-03 00:16:55 -0700
committerKalimochoAz <calimochoazucarado@gmail.com>2012-05-22 09:38:17 +0200
commit1078e0c8c25a2c103642f8b4228063cbf4ef745c (patch)
tree22d732fa4352f49b60cb73f0887a25b1a3d50470 /drivers/cpufreq
parentfcca1ed46eca88f693aa3100966996061191d6d0 (diff)
downloadkernel_samsung_crespo-1078e0c8c25a2c103642f8b4228063cbf4ef745c.zip
kernel_samsung_crespo-1078e0c8c25a2c103642f8b4228063cbf4ef745c.tar.gz
kernel_samsung_crespo-1078e0c8c25a2c103642f8b4228063cbf4ef745c.tar.bz2
cpufreq: interactive: add boost pulse interface
Change-Id: Icf1e86d2065cc8f0816ba9c6b065eb056d4e8249 Signed-off-by: Todd Poynor <toddpoynor@google.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/cpufreq_interactive.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
index 9572736..7e17725 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -497,7 +497,6 @@ static void cpufreq_interactive_boost(void)
unsigned long flags;
struct cpufreq_interactive_cpuinfo *pcpu;
- trace_cpufreq_interactive_boost(hispeed_freq);
spin_lock_irqsave(&up_cpumask_lock, flags);
for_each_online_cpu(i) {
@@ -536,8 +535,10 @@ static void cpufreq_interactive_input_event(struct input_handle *handle,
unsigned int type,
unsigned int code, int value)
{
- if (input_boost_val && type == EV_SYN && code == SYN_REPORT)
+ if (input_boost_val && type == EV_SYN && code == SYN_REPORT) {
+ trace_cpufreq_interactive_boost("input");
cpufreq_interactive_boost();
+ }
}
static void cpufreq_interactive_input_open(struct work_struct *w)
@@ -765,16 +766,36 @@ static ssize_t store_boost(struct kobject *kobj, struct attribute *attr,
boost_val = val;
- if (boost_val)
+ if (boost_val) {
+ trace_cpufreq_interactive_boost("on");
cpufreq_interactive_boost();
- else
- trace_cpufreq_interactive_unboost(hispeed_freq);
+ } else {
+ trace_cpufreq_interactive_unboost("off");
+ }
return count;
}
define_one_global_rw(boost);
+static ssize_t store_boostpulse(struct kobject *kobj, struct attribute *attr,
+ const char *buf, size_t count)
+{
+ int ret;
+ unsigned long val;
+
+ ret = kstrtoul(buf, 0, &val);
+ if (ret < 0)
+ return ret;
+
+ trace_cpufreq_interactive_boost("pulse");
+ cpufreq_interactive_boost();
+ return count;
+}
+
+static struct global_attr boostpulse =
+ __ATTR(boostpulse, 0200, NULL, store_boostpulse);
+
static struct attribute *interactive_attributes[] = {
&hispeed_freq_attr.attr,
&go_hispeed_load_attr.attr,
@@ -783,6 +804,7 @@ static struct attribute *interactive_attributes[] = {
&timer_rate_attr.attr,
&input_boost.attr,
&boost.attr,
+ &boostpulse.attr,
NULL,
};