summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjyzhang1 <jyzhang1@mobvoi.com>2017-09-27 17:23:41 +0800
committerjingyi(BSP) Zhang <jyzhang1@mobvoi.com>2017-10-03 06:34:12 +0000
commit6a297c1129b48adf5aacea329af00fae02bf2af1 (patch)
tree7ddbc821bed5b4b0cae35c540c0be380a777a546
parent42d63e5ea195858bf13d08e2c6762dd38b5a9808 (diff)
downloadmediatek-6a297c1129b48adf5aacea329af00fae02bf2af1.tar.gz
touch: fix the touch patch "Change 909553" side effect
BUG:65529778 1.delete the spinlock 2.modify set the ambient flag before touch resume flow 3.unmask touch interrupt in the touch resume, so is_ambient_mode and wakeup_event_mask flag will keep consistency. 4.beacuse the ambient flag is set, T100 message interrupt will not enter the wakeup flow, and wakeup_event_mask will no confused. Change-Id: I85ae842e74d3ed211d8d542589fa66d8629df25c
-rwxr-xr-xdrivers/input/touchscreen/mediatek/MXT144U/atmel_mxt.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/input/touchscreen/mediatek/MXT144U/atmel_mxt.c b/drivers/input/touchscreen/mediatek/MXT144U/atmel_mxt.c
index 836d96049835..b9934c8bfd1b 100755
--- a/drivers/input/touchscreen/mediatek/MXT144U/atmel_mxt.c
+++ b/drivers/input/touchscreen/mediatek/MXT144U/atmel_mxt.c
@@ -72,7 +72,6 @@ static unsigned long palm_time_stamp = 0;
static bool need_power_reboot = false;
static int wakeup_event_mask = 0;
struct wake_lock touch_irq_lock;
-spinlock_t touch_irq_spin_lock;
/* Variable Declaration */
@@ -5429,7 +5428,6 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)
mxt_i2c_data = data;
wake_lock_init(&touch_irq_lock, WAKE_LOCK_SUSPEND, "touch irq wakelock");
- spin_lock_init(&touch_irq_spin_lock);
mt_set_gpio_mode(GPIO61, 0);
mt_set_gpio_mode(GPIO62, 0);
@@ -5815,17 +5813,14 @@ static int fb_notifier_callback(struct notifier_block *self,
struct fb_event *evdata = data;
int *blank;
struct mxt_data *mxt = container_of(self, struct mxt_data, fb_notif);
- unsigned long flags;
if (evdata && evdata->data && event == FB_EVENT_BLANK &&
mxt && mxt->client) {
blank = evdata->data;
if (*blank == FB_BLANK_UNBLANK) {
- spin_lock_irqsave(&touch_irq_spin_lock, flags);
wakeup_event_mask = 0;
- mxt_tpd_resume(NULL);
mxt->is_ambient_mode = false;
- spin_unlock_irqrestore(&touch_irq_spin_lock, flags);
+ mxt_tpd_resume(NULL);
MXT_LOG("is_ambient_mode change to 0\n");
return 0;
#ifdef MAX1_WAKEUP_GESTURE_ENABLE