Bring in s2w/dt2w from flar2/showp and enable in slim defconfig

drivers/input/touchscreen/touch_synaptics_ds5.c: No suspend irq

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

add sweep2wake source files

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

sweep2wake: add qpnp-power-on hooks for the power key

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

drivers/input/touchscreen/touch_synaptics_ds5: add is_single_touch & s2w detection hook

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

sweep2wake: backport per device settings from sweep2wake2 (like pwr btn choice too)

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

drivers/input/touchscreen/touch_synaptics_ds5: disable suspend if sweep2wake is enabled

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

drivers/input/touchscreen/touch_synaptics_ds5: add reset code on finger release

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

drivers/input/touchscreen/touch_synaptics_ds5: add screen suspend indicator

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

sweep2wake: add irq_wake indicator

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

drivers/input/touchscreen/touch_synaptics_ds5: re-add android_touch kobj

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

drivers/input/touchscreen/touch_synaptics_ds5: add missing irq_wake controls and fix c&p typo

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

drivers/input/touchscreen/touch_synaptics: patch with sweep2wake hooks as well

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

drivers/input/touchscreen/touch_synaptics_ds5: fix epic c&p fails for irq_wake indicator

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

mdss_dsi: do not power down panel when sweep2wake is enabled In order to detect touches during suspend, the panel must be powered on. When sweep2wake is enabled, change one of the panel-off-cmds in mdss_dsi_panel.c from 0x10 to 0x11.

Signed-off-by: flar2 <asegaert@gmail.com>

mdss_dsi_panel: keep the panel gpio active and don't trigger a reset

This way we will suffer minimum leakage when sweep2wake is being used.
All that is kept online here is the chip controlling the panel and touch panel.
That chip is probably some pmic but either way, keeping it online will cause
minimum leakage. This is an improvement upon the original patch by flar2 which
led to massive leakage from the display regulators since all were kept online.

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

sweep2wake: massive update, bring on par with s2w2 except algorithm

This patches sweep2wake on par with s2w2, minus the detection algorithm.
Changes in detail:
- Remove dependency on a power key setter, use a dummy device.
- Remove dependency on a touchscreen driver, use an input callback
- Remove dependency on external sysfs functions
- Remove dependency on external reset calls
- Migrate all of this into sweep2wake

Porting to new devices is now easier than ever:
1. Define your device parameters in the Sweep2wake tuneables
2. Check if the android_touch_kobj is already used by your touchscreen driver
2a. If it is export it and define S2W_ANDROID_TOUCH_DECLARED
(This will prevent s2w from spawning it's own kobj)
3. Force the touchscreen driver to deliver signals in suspend and you are done.

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

sweep2wake & touchscreens: replaced flawed irq_wake procedures with linux functions Also init device wakeup in init to be able to use those functions in the first place

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

sweep2wake: we no longer need irq_wake. remove it. Also clean up variable declariation to save some space

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

touch_synaptics: bring on par with touch_synaptics_ds5

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

touch_synaptics: 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.

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

touch_synaptics_ds5: 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.

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

sweep2wake: disable debugging

Signed-off-by: flar2 <asegaert@gmail.com>

sweep2wake: disabled as default, enable it over apps/sysfs

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

sweep2wake: cleanup header file

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

touch_synaptics_ds5: remove wakeup procedure for i2c device

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

touch_synaptics_ds5: don't wait for irq events to be handled, just disable the irq

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

touch_synaptics: remove wakeup procedure for i2c device

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

touch_synaptics: don't wait for irq events to be handled, just disable the irq

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

s2w: rename version file so we don't conflict with dt2w, driver versions, etc

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

sweep2wake/doubletap2wake/touchscreen: Prepare for dt2w

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

sweep2wake: update header information

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

sweep2wake: remove distinction between S2W and DT2W defines

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

add doubletap2wake, completely rewritten on the s2w template

This is as easy to port as s2w, if not easier since no touchscreen
coords are necessary for it to work.

Just throw it in your tree, force the touchscreen to stay online and
you are done.

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

s2w: abort on multitouch events early

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

dt2w: fix triple tap to wake occuring sometimes

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

Option to disable touch wake with power button

Signed-off-by: flar2 <asegaert@gmail.com>

Conflicts:
	drivers/video/msm/mdss/mdss_dsi_panel.c

Add option for sweep2sleep only

Signed-off-by: flar2 <asegaert@gmail.com>

Prevent touches during phone calls

Signed-off-by: flar2 <asegaert@gmail.com>

drivers/input/touchscreen/doubletap2wake: Fix compilation with earlysuspend

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

drivers/input/touchscreen/sweep2wake: Fix compilation with earlysuspend

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

restrict to bottom of screen, reduce feather radius, shorten time window, disable near edges

Signed-off-by: flar2 <asegaert@gmail.com>

doubletap2wake: back to full screen, make a bit more sensitive

Signed-off-by: flar2 <asegaert@gmail.com>

fullscreen option

Signed-off-by: flar2 <asegaert@gmail.com>

Make power button also disable irq_wake in touch driver

Signed-off-by: flar2 <asegaert@gmail.com>

fix unbalanced irq_wake

Signed-off-by: flar2 <asegaert@gmail.com>

disable s2w/dt2w after timeout

Signed-off-by: flar2 <asegaert@gmail.com>

Disable by default and remove leftovers

Signed-off-by: flar2 <asegaert@gmail.com>

Wake Gestures interface and other options for S2W/S2S/DT2W

The wake gestures interface creates a new input device (wake_gesture) and generates input events for several gestures while the screen is off:

1 -> sweep right
2 -> sweep left
3 -> sweep up
4 -> sweep down
5 -> doubletap

These input events can be used by userspace apps to perform custom actions for each gesture

Also added bi-directional sweep2sleep, omnidirectional sweep2wake and optional haptic feedback for gestures

Signed-off-by: flar2 <asegaert@gmail.com>

Wake gestures: adjust sweep length and doubletap timeout

Signed-off-by: flar2 <asegaert@gmail.com>

Wake Timeout: fix dependency

Signed-off-by: flar2 <asegaert@gmail.com>