diff --git a/drivers/input/touchscreen/nvt_touch_e7s/nt36xxx.c b/drivers/input/touchscreen/nvt_touch_e7s/nt36xxx.c index e39d97123820..b79cdf43d581 100644 --- a/drivers/input/touchscreen/nvt_touch_e7s/nt36xxx.c +++ b/drivers/input/touchscreen/nvt_touch_e7s/nt36xxx.c @@ -239,6 +239,7 @@ const uint16_t gesture_key_array[] = { KEY_WAKEUP, KEY_WAKEUP, KEY_WAKEUP, + KEY_DOUBLE_TAP, }; bool enable_gesture_mode = false; diff --git a/drivers/input/touchscreen/synaptics_dsx_e7s/synaptics_dsx_core.c b/drivers/input/touchscreen/synaptics_dsx_e7s/synaptics_dsx_core.c index 962467bebc9c..9c370d9a7fee 100644 --- a/drivers/input/touchscreen/synaptics_dsx_e7s/synaptics_dsx_core.c +++ b/drivers/input/touchscreen/synaptics_dsx_e7s/synaptics_dsx_core.c @@ -1127,8 +1127,10 @@ static int synaptics_rmi4_f11_abs_report(struct synaptics_rmi4_data *rmi4_data, if (detected_gestures) { input_report_key(rmi4_data->input_dev, KEY_WAKEUP, 1); + input_report_key(rmi4_data->input_dev, KEY_DOUBLE_TAP, 1); input_sync(rmi4_data->input_dev); input_report_key(rmi4_data->input_dev, KEY_WAKEUP, 0); + input_report_key(rmi4_data->input_dev, KEY_DOUBLE_TAP, 0); input_sync(rmi4_data->input_dev); rmi4_data->suspend = false; } @@ -1297,8 +1299,10 @@ static int synaptics_rmi4_f12_abs_report(struct synaptics_rmi4_data *rmi4_data, if (gesture_type && gesture_type != F12_UDG_DETECT) { input_report_key(rmi4_data->input_dev, KEY_WAKEUP, 1); + input_report_key(rmi4_data->input_dev, KEY_DOUBLE_TAP, 1); input_sync(rmi4_data->input_dev); input_report_key(rmi4_data->input_dev, KEY_WAKEUP, 0); + input_report_key(rmi4_data->input_dev, KEY_DOUBLE_TAP, 0); input_sync(rmi4_data->input_dev); rmi4_data->suspend = false; @@ -3482,7 +3486,9 @@ static void synaptics_rmi4_set_params(struct synaptics_rmi4_data *rmi4_data) if (rmi4_data->f11_wakeup_gesture || rmi4_data->f12_wakeup_gesture) { set_bit(KEY_WAKEUP, rmi4_data->input_dev->keybit); + set_bit(KEY_DOUBLE_TAP, rmi4_data->input_dev->keybit); input_set_capability(rmi4_data->input_dev, EV_KEY, KEY_WAKEUP); + input_set_capability(rmi4_data->input_dev, EV_KEY, KEY_DOUBLE_TAP); } return; @@ -4388,7 +4394,7 @@ static int synaptics_rmi4_probe(struct platform_device *pdev) queue_work(rmi4_data->reset_workqueue, &rmi4_data->reset_work); #endif input_set_capability(rmi4_data->input_dev, EV_KEY, KEY_WAKEUP); - + input_set_capability(rmi4_data->input_dev, EV_KEY, KEY_DOUBLE_TAP); INIT_WORK(&rmi4_data->fb_notify_work, tp_fb_notifier_resume_work); return retval; diff --git a/drivers/input/touchscreen/synaptics_dsx_e7s/synaptics_dsx_gesture.c b/drivers/input/touchscreen/synaptics_dsx_e7s/synaptics_dsx_gesture.c index c91eb26b88bb..623d431211fe 100644 --- a/drivers/input/touchscreen/synaptics_dsx_e7s/synaptics_dsx_gesture.c +++ b/drivers/input/touchscreen/synaptics_dsx_e7s/synaptics_dsx_gesture.c @@ -1498,8 +1498,10 @@ static void udg_report(void) if (udg->detection_status == DETECTION) { input_report_key(udg->udg_dev, KEY_WAKEUP, 1); + input_report_key(udg->udg_dev, KEY_DOUBLE_TAP, 1); input_sync(udg->udg_dev); input_report_key(udg->udg_dev, KEY_WAKEUP, 0); + input_report_key(udg->udg_dev, KEY_DOUBLE_TAP, 0); input_sync(udg->udg_dev); rmi4_data->suspend = false; } @@ -2041,7 +2043,9 @@ static int synaptics_rmi4_udg_init(struct synaptics_rmi4_data *rmi4_data) set_bit(EV_KEY, udg->udg_dev->evbit); set_bit(KEY_WAKEUP, udg->udg_dev->keybit); + set_bit(KEY_DOUBLE_TAP, udg->udg_dev->keybit); input_set_capability(udg->udg_dev, EV_KEY, KEY_WAKEUP); + input_set_capability(udg->udg_dev, EV_KEY, KEY_DOUBLE_TAP); retval = input_register_device(udg->udg_dev); if (retval) { diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index 0d9bac9f9ebb..a5a3a089dc49 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -218,6 +218,7 @@ #define KEY_SETUP 141 #define KEY_SLEEP 142 /* SC System Sleep */ #define KEY_WAKEUP 143 /* System Wake Up */ +#define KEY_DOUBLE_TAP 750 /* DT2W */ #define KEY_FILE 144 /* AL Local Machine Browser */ #define KEY_SENDFILE 145 #define KEY_DELETEFILE 146