input: add generic touchboost driver based on CAF's cpu-boost driver code.

Change-Id: I4611d43bd6404e33be4b9d7c76bd31eb7c5cee9b
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
input: touchboost: make the wq freezable and remove keypad/touchpad filters.

Change-Id: Ia537c1ca3d6540eee4d07f95f2a536c0db4704d3
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
input: touchboost: add back keypad filtering. I removed it earlier because I didn't know what it was for, so it seems it is, in this device's case, volume up/down and power button.

Change-Id: I3ecfb74ab6728e2f962ec751b118c573fdf76c80
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
input: touchboost: remove keypad filter.

it seems that some idiot decided to bundle Bluetooth disconnect event
through the keypad filter so users were having kernel_panics in that scenario.
Also no need to call cpufreq_driver_target because
interactive's speedtask thread will push do it for us in the next timer_rate.
Since timer_rate is 30ms by default we adjust the minimum frequency
for 40ms up to input_boost_freq, then the governor will catch up.

Change-Id: I9810e4758aeef52e8da43cde7e7817bfd80b2d63
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
input: touchboost: I misinterpretaded the panic log

..when a BT device was disconnected and what was actually causing
the crash was destroying the WQ.
Also fix a small bug where if the user underclocked below
input_boost_freq after a touch input max/min freqs
would be changed to wrong frequencies.

Change-Id: I93845c89eb731f215c5019554cfb5be782e22d79
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
input: touchboost: make sure we don't queue another input_boost work

...if input_boost removal work is running.

Change-Id: I29c8ba155a72b42f9cc030bacfc012fd5f13778a
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
input: touchboost: register the cpufreq notifier later.

Change-Id: Ib43ddbdc877088b7b9113000a6a3600ac9f66db9
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: fb: Little hack to allow the lowest brightness value

...to be as low as possible.

Change-Id: I639927bcfc9af13734968a9e557e93f478d13d4d
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
input: touchboost: don't refresh the policy limits

..if the current frequency is not lower than input_boost_freq.

Change-Id: I26a47434ec565c4e013db18be0ea6a06ff19eff4
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
input: touchboost: this needs to be set on a per cpu basis.

Change-Id: I39007859fe46b664fb8cc1fe86855133ff0f6e2f
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
input: touchboost: leave the governor taking care of the cpu frequency changes.

I've tried a gazillion different ways to deal with input cpu-boost events,
but in the end what really works for me and
flawlessly is leaving the governor taking care of the cpu frequency changes.
I'd rather have a global input register handler
that feeds the governor with the touch input times in usecs
and leave the boosting logic to the governor.
CAF's cpu-boost code is half broken too so
I'm not bothering with trying it again.

Change-Id: I2296bab19eb243c8550aa986d7cde13de0f8447a
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>