Lenovo trackpoints are adding the ability to generate a doubletap event. This handles the doubletap event and sends the KEY_DOUBLECLICK event to userspace. Signed-off-by: Mark Pearson <mpearson-lenovo@xxxxxxxxx> Signed-off-by: Vishnu Sankar <vsankar@xxxxxxxxxx> --- drivers/platform/x86/thinkpad_acpi.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 82429e59999d..2bbb32c898e9 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -232,6 +232,7 @@ enum tpacpi_hkey_event_t { /* Misc */ TP_HKEY_EV_RFKILL_CHANGED = 0x7000, /* rfkill switch changed */ + TP_HKEY_EV_TRACKPOINT_DOUBLETAP = 0x8036, /* doubletap on Trackpoint*/ }; /**************************************************************************** @@ -4081,6 +4082,22 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) break; } fallthrough; /* to default */ + case 8: + /* 0x8036: Trackpoint doubletaps */ + if (hkey == TP_HKEY_EV_TRACKPOINT_DOUBLETAP) { + send_acpi_ev = true; + ignore_acpi_ev = false; + known_ev = true; + /* Send to user space */ + mutex_lock(&tpacpi_inputdev_send_mutex); + input_report_key(tpacpi_inputdev, KEY_DOUBLECLICK, 1); + input_sync(tpacpi_inputdev); + input_report_key(tpacpi_inputdev, KEY_DOUBLECLICK, 0); + input_sync(tpacpi_inputdev); + mutex_unlock(&tpacpi_inputdev_send_mutex); + break; + } + fallthrough; /* to default */ default: known_ev = false; } -- 2.44.0