Squash Stratosk's UV control

msm: acpuclock-krait: Add undervolting support

Add undervolting support using 3 module parameters:
- lower_uV: undervolting value for lower frequencies
- upper_uV: undervolting value for upper frequencies
- upper_khz_thers: above this frequency upper_uV will be used. Else
lower_uV will be used.

Undervolting value is subtracted from stock voltage. The final voltage
for each frequency is calulated:
Vdd(final) = Vdd(core) + boost_uV - uV

Also debugfs (acpuclk/acpu_table) is used to show the acpu table
frequencies and voltages.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>

msm: acpuclock-krait: Replace 'upper' with 'higher'

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>

msm: acpuclock-krait: Use conditional directives for debufs parts

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>

msm: acpuclock-krait: Add a column with undervolting value in debugfs

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>

msm: acpuclock-krait: Fix type in message

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>

msm: acpuclock-krait: Fix checkpatch warnings

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>

msm: mako: Change CPU regulators min_uV to 700mV

Thanks to sirxdroid for reporting this.
Thanks to thracemerin for help.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>

msm: cpufreq: Break out early if target frequency is the same as the current

Change-Id: I7b22265e42f7effe9b29db220e05993484fee19c
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
msm: Makefile: we don't need these in mako

Change-Id: Ib254ae3d57353cf3031cb6f2986517416bc7af3e
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: acpuclock-krait: Change the pvs bin retrieval

Change-Id: I1707618d607640ddcf34073c590f165a8b745ba1
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: acpuclock-krait: Fix build error

Change-Id: I2afaef48976b4dd77cc98bfbbca7a915a3722ff8
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: acpuclock-krait: Fix PVS name in table show

Change-Id: Ie6475e104dfa9a257910343132e69de018e9b4fa
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
msm: pm: send notification only for SPC and PC

Currently the pm notification is sent for all the low power
modes of each CPU. Generally the subscriber to this notification
expects to be notified for core power collapse. For example
interrupt controller subscribes this notification to save
and restore its context when entering and exit power collapse
respectively. So this is not necessary for shallow power modes
like WFI and Retention.

This change is to send the notification for only standalone
power collapse of each core and idle power collapse of core0.

Change-Id: I39fb6a6bfb47ca49d6ec8df8cad1fd74424140a0
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
Squash Showp's Sweep to wake

drivers/touchscreen: add sweep2wake

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>

Conflicts:
	drivers/input/touchscreen/Kconfig

sweep2wake: fix last touch not being released

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>

drivers/touchscreen: add pmops and allow i2c to wake the device (even w/o ES/LR)

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>

Conflicts:
	drivers/input/touchscreen/lge_touch_core.c

Conflicts:
	arch/arm/configs/slim_mako_defconfig

Change-Id: I074fb92b417063edc5395e393ea2c357e9cd9bf6

drivers/touchscreen: add lge_touch android_touch kobject to fix s2w in one position across devices

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>

Conflicts:
	drivers/input/touchscreen/lge_touch_core.c

sweep2wake: disable as default for now
(until s2w 2.0 removes all existing issues)

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>

HACK: sweep2wake: sleep the data thread for 40ms to allow i2c to wake up
Backport from s2w 2.0.

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>

Add Sweep to wake on defconfig

Change-Id: Iac29c83f0be14530706ac50ccb418d9fa92ba62a
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
Revert "HACK: sweep2wake: sleep the data thread for 40ms to allow i2c to wake up"

This reverts commit 0d4a16c8147b460b7f5459eb6a2058dc27c9a2e6.

Change-Id: I8732635e4464fcead2d3cd204fe471678ed6a14e
Revert "drivers/touchscreen: add lge_touch android_touch kobject to fix s2w in one position across devices"

This reverts commit f74debfe0974d39f8ee0a592ecf088b180a9e301.

Change-Id: I400890d9aa37b038da8b794ed5c3234edee488aa
Revert "drivers/touchscreen: add pmops and allow i2c to wake the device (even w/o ES/LR)"

This reverts commit dc8fd0fea6f56cc2376cc08f8fc798e00c5598a7.

Change-Id: Ie24a49e1e5f5106849e6ef5f75434f2cb05031e4
Revert "sweep2wake: fix last touch not being released"

This reverts commit 4dab74f002ad58366d220d723d2dafffe0161c96.

Change-Id: I10e4dc484efda79da5b2d02654bab0fc001bcb2b
Revert "drivers/touchscreen: add sweep2wake"

This reverts commit eee73bad7305acff7608056cedbbee613f567be6.

Conflicts:
	drivers/input/touchscreen/sweep2wake.c

Change-Id: I3dfc4e3a3616acc496375e03f08483db1191ae18
lge_touch_core: i2c_read: auto retry 10 times before erroring out
The i2c devices we are connecting to may not be ready yet, or just
busy. Retry with a 10ms pause in order to still obtain touch data.
This improves overall touch data robustness, but the main thing it
does:
WE CAN FINALLY GET TOUCH DATA IN SUSPEND ALL THE TIME.

Change-Id: I7e37b9640c022831437476eced1f74b9bae9070f
Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
driver/input/touchscreen: add new s2w & dt2w implemenation from hammerhead

Change-Id: I76e8f2e8774afae2514a52f7b2087e87eb4073fd
Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
defconfig: update, also enable s2w and dt2w

Change-Id: I66484cacdf13ee4f9f2e5924b2949b502f27dda9
Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
drivers/input/touchscreen/doubletap2wake: Fix compilation with earlysuspend

Change-Id: I76c29277219e0848aa53f74657613d7ca148b213
Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
drivers/input/touchscreen/sweep2wake: Fix compilation with earlysuspend

Change-Id: I5f6ca9cd984d7f3786f59c961d03305d39a2a597
Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
drivers/input/touchscreen/lge_touch_core: Add prevent_sleep functionality

Change-Id: I97a64480606e88cb1dcc7f4fce95060df854f57a
Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
drivers/input/touchscreen/lge_touch_core: release all touchscreen events when going to sleep

Change-Id: I83fb72d15f7873cdaca2f5544d9de5ab265d5332
Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
drivers/input/touchscreen/sweep2wake: add mako definitions

Change-Id: I00f3c4005015f6b750ced57dd19293a15955a7c2
Signed-off-by: Dennis Rassmann <showp1984@gmail.com>