Skip to content

Commit ec91862

Browse files
showp1984Albinoman887
authored andcommitted
Squash s2w commits
sweep2unlock: Add sweep2unlock v0.1 Thanks to Ezekeel's gladoskernel source which helped me a lot in understanding how to emulate a virtual powerkey press. The powerkey emulation is largely inspired by his coding for Touch2Wake (Galaxy Nexus). sweep2unlock: check if screen is offline sweep2unlock: remove lck_reverse & checks sweep2unlock: change sleep value, correct typo, add comment sweep2unlock: change conditions Don't assume unlock/lock is triggered if only one condition is met. The new implementation includes checking if 3 barriers are hit before triggering the lock/unlock. This assures only intentional triggering. Also only allow one trigger as long as the finger still touches the screen. Reset and allow another trigger if the all fingers are lifted. sweep2unlock: change barriers for screenoff trigger to avoid taking loads of screenshots :D sweep2unlock: set scr_suspended early so that additional locks/unlocks are avoided sweep2unlock: don't allow jumping through all barriers without having hit them sweep2unlock: use an additional variable to determine if the barrier is already breached sweep2unlock: change values to avoid taking screenshots when touching 'home' sweep2unlock: break the loop if triggered, decrease sleep delay, change values to avoid screenshots when fast sweeping #2 sweep2unlock: Change barriers and homebutton back to original values. The screenshot function from the HTC framework should be disabled to avoid taking screenshots. This is the proper way of doing things. We still have the AOSP screenshot variant which can be accessed by pressing Vol.DOWN + POWER at the same time and holding them for about one second. sweep2unlock: restructure early suspend / late resume hack sweep2unlock: relocate main code, reformat it, change debug echo, slight 3rd barrier adjustment sweep2unlock: use wakelocks This solves not triggering irqs while the screen is offline. It has to show how that affects battery life. sweep2wake: rename sweep2unlock sweep2wake: 'fat finger' fix ;) sweep2wake: Add Kconfig entry sweep2wake: redesign wakelocks Only wakelock if necessary and release the wakelock immediately if not. sweep2wake: allow the touchscreen irq to wake the phone sweep2wake: remove wakelocks from the code Since we now have a completely interrupt based wake up call these wakelocks are obsolete so remove them. sweep2wake: fix unresponsive touchscreen (depends on hw revision) sweep2wake: redefine barriers for easier (un)locks sweep2wake: add debug info sweep2wake: fix typo, no need to enable something that is already enabled sweep2wake: increase simulated powerkey press length sweep2wake: Don't set suspended state if screen is not suspended sweep2wake: add cmdline interface (on/off) sweep2wake: reenable all suspend/resume commands if s2w_switch == false cmdline_s2w: add debug output sweep2wake: restructure ifdefs to gain readability sweep2wake: always set suspend=1, reset baseline If this is not set the baseline will not be reset when the device comes from sleep, which results in an unresponsive touchscreen. (Similiar to a gounding issue) sweep2wake: get button-backlight device sweep2wake: enable dynamic button_backlight If the screen is offline and you touch the home button (aka start a sweep2unlock) the capacitive buttons will light up to guide your path. They will be shutdown again as soon as you lift your finger. sweep2wake: fix unlock start position sweep2wake: Only reset the baseline if the screen is suspended, fix for old touchcontroller hwrev sweep2wake: on resume suspend our touch controller for a short while This allows resume to wake it up the right way a bit further down. This is a HW revision fix, it is not needed for all touch controllers! Sadly this breaks the sweep2unlock gesture. sweep2wake: revert resetting the baseline sweep2wake: button_backlight: fix backlight staying on sweep2wake: fix led flickering as far as possible for now sweep2wake: fix button_backlight being activated when sweeping to lock the phone sweep2wake: increase fake suspend time, hw revision fix sweep2wake: fix incorrect debug message sweep2wake: add option to disable the button backlight control input/touchscreen: cy8c: fix multitouch on certain hw revisions sweep2wake: add sysfs-interface sweep2wake: sysfs: no need to set the same value again :) Signed-off-by: showp1984 <showp1984@gmail.com> sweep2wake: sysfs: add missing ifdefs Signed-off-by: showp1984 <showp1984@gmail.com>
1 parent b27451e commit ec91862

7 files changed

Lines changed: 297 additions & 12 deletions

File tree

drivers/input/input.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ static void input_handle_event(struct input_dev *dev,
242242
case EV_KEY:
243243
if (is_event_supported(code, dev->keybit, KEY_MAX) &&
244244
!!test_bit(code, dev->key) != value) {
245-
246245
if (value != 2) {
247246
__change_bit(code, dev->key);
248247
if (value)

drivers/input/misc/gpio_event.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@
2020
#include <linux/hrtimer.h>
2121
#include <linux/platform_device.h>
2222
#include <linux/slab.h>
23+
2324
#ifdef CONFIG_TOUCHSCREEN_ATMEL_SWEEP2WAKE
2425
#include <linux/atmel_qt602240.h>
2526
#endif
2627

28+
#ifdef CONFIG_TOUCHSCREEN_CYPRESS_SWEEP2WAKE
29+
#include <linux/cy8c_tma_ts.h>
30+
#endif
31+
2732
struct gpio_event {
2833
struct gpio_event_input_devs *input_devs;
2934
const struct gpio_event_platform_data *info;
@@ -179,6 +184,12 @@ static int gpio_event_probe(struct platform_device *pdev)
179184
sweep2wake_setdev(input_dev);
180185
printk(KERN_INFO "[SWEEP2WAKE]: set device %s\n", input_dev->name);
181186
}
187+
#endif
188+
#ifdef CONFIG_TOUCHSCREEN_CYPRESS_SWEEP2WAKE
189+
if (!strcmp(input_dev->name, "pyramid-keypad")) {
190+
sweep2wake_setdev(input_dev);
191+
printk(KERN_INFO "[sweep2wake]: set device %s\n", input_dev->name);
192+
}
182193
#endif
183194
}
184195
ip->input_devs->count = dev_count;

drivers/input/touchscreen/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ config TOUCHSCREEN_CYPRESS_TMA
135135
depends on I2C
136136
default n
137137

138+
config TOUCHSCREEN_CYPRESS_SWEEP2WAKE
139+
tristate "Sweep2Wake for Cypress TMA300 based touchscreens"
140+
depends on TOUCHSCREEN_CYPRESS_TMA
141+
default n
142+
138143
config TOUCHSCREEN_COMPATIBLE_REPORT
139144
bool "Touchscreen compatible repodepends on I2C"
140145
default n

0 commit comments

Comments
 (0)