summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/atmel_mxt_ts.c
diff options
context:
space:
mode:
authorBenson Leung <bleung@chromium.org>2014-07-23 12:22:27 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-07-23 13:25:11 -0700
commitb735fbe064a0a64d848e3002f41b7e5f657d5665 (patch)
tree730200f587907071ad47f47a60bb26024a43ea6f /drivers/input/touchscreen/atmel_mxt_ts.c
parent7a53d60926714541e2250b7c55100883cdcaf787 (diff)
downloadop-kernel-dev-b735fbe064a0a64d848e3002f41b7e5f657d5665.zip
op-kernel-dev-b735fbe064a0a64d848e3002f41b7e5f657d5665.tar.gz
Input: atmel_mxt_ts - set pointer emulation on touchpads
Touchpads are pointers, so make sure to pass the correct values to input_mt_report_pointer_emulation(). Without this, tap-to-click doesn't work. Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/atmel_mxt_ts.c')
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index a248414..31113c3 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -654,10 +654,11 @@ static void mxt_input_button(struct mxt_data *data, struct mxt_message *message)
}
}
-static void mxt_input_sync(struct input_dev *input_dev)
+static void mxt_input_sync(struct mxt_data *data)
{
- input_mt_report_pointer_emulation(input_dev, false);
- input_sync(input_dev);
+ input_mt_report_pointer_emulation(data->input_dev,
+ data->pdata->t19_num_keys);
+ input_sync(data->input_dev);
}
static void mxt_input_touchevent(struct mxt_data *data,
@@ -707,7 +708,7 @@ static void mxt_input_touchevent(struct mxt_data *data,
if (status & MXT_T9_RELEASE) {
input_mt_report_slot_state(input_dev,
MT_TOOL_FINGER, 0);
- mxt_input_sync(input_dev);
+ mxt_input_sync(data);
}
/* Touch active */
@@ -783,7 +784,7 @@ static irqreturn_t mxt_process_messages_until_invalid(struct mxt_data *data)
} while (reportid != 0xff);
if (update_input)
- mxt_input_sync(data->input_dev);
+ mxt_input_sync(data);
return IRQ_HANDLED;
}
OpenPOWER on IntegriCloud