CONFIG_RFKILL=y
CONFIG_AMLOGIC_DRIVER=y
CONFIG_AMLOGIC_MODIFY=y
+CONFIG_AMLOGIC_INPUT_BOOST=y
CONFIG_AMLOGIC_UART=y
CONFIG_AMLOGIC_SERIAL_MESON_CONSOLE=y
CONFIG_AMLOGIC_IOMAP=y
it if your chip belongs this group
endchoice #AMLOGIC_CPUFREQ
+
+config AMLOGIC_INPUT_BOOST
+ bool "Meson BOOST cpufreq when key input"
+ depends on CPU_FREQ_GOV_INTERACTIVE
+ help
+ This adds boost cpuferq support when key input detected.
+ This adds boost cpuferq support when key input detected.
+ When key input, cpufreq is boosted.
+ And boost_duration is decideded by AMLOGIC_INPUT_BOOST_DURATION
+
+config AMLOGIC_INPUT_BOOST_DURATION
+ int "Input boost duration"
+ range 0 5000
+ default 1000
+ depends on AMLOGIC_INPUT_BOOST
+ help
+ This set boost cpuferq duration.
+ unit is ms.
+
kfree(tunables);
}
+#ifdef CONFIG_AMLOGIC_INPUT_BOOST
+void set_boostpulse(void)
+{
+ struct interactive_tunables *tunables;
+ struct interactive_cpu *icpu;
+
+ icpu = &per_cpu(interactive_cpu, smp_processor_id());
+
+ if (!down_read_trylock(&icpu->enable_sem))
+ return;
+
+ if (!icpu->ipolicy) {
+ up_read(&icpu->enable_sem);
+ return;
+ }
+
+ tunables = icpu->ipolicy->tunables;
+ tunables->boostpulse_endtime = ktime_to_us(ktime_get()) +
+ CONFIG_AMLOGIC_INPUT_BOOST_DURATION * 1000;
+ trace_cpufreq_interactive_boost("pulse");
+ if (!tunables->boosted)
+ cpufreq_interactive_boost(tunables);
+ up_read(&icpu->enable_sem);
+}
+EXPORT_SYMBOL(set_boostpulse);
+#endif
+
int cpufreq_interactive_init(struct cpufreq_policy *policy)
{
struct interactive_policy *ipolicy;
#include <linux/mutex.h>
#include <linux/rcupdate.h>
#include "input-compat.h"
+#ifdef CONFIG_AMLOGIC_INPUT_BOOST
+#include <linux/cpufreq.h>
+#endif
MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
MODULE_DESCRIPTION("Input core");
break;
}
+#ifdef CONFIG_AMLOGIC_INPUT_BOOST
+ set_boostpulse();
+#endif
+
if (!!test_bit(code, dev->key) != !!value) {
__change_bit(code, dev->key);
struct sched_domain;
unsigned long cpufreq_scale_freq_capacity(struct sched_domain *sd, int cpu);
unsigned long cpufreq_scale_max_freq_capacity(int cpu);
+#ifdef CONFIG_AMLOGIC_INPUT_BOOST
+void set_boostpulse(void);
+#endif
#endif /* _LINUX_CPUFREQ_H */