diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-09-15 09:52:21 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-09-15 09:52:21 -0700 |
commit | bbc8608755da42e7494c00dce24a636007972def (patch) | |
tree | 7db003ee57a435042dedfa6664aef31c24922c04 /drivers/input/touchscreen/goodix.c | |
parent | a6cbfa1e6d38c4b3ab0ce7e3aea4bb4e744f24b8 (diff) | |
parent | 697c5d8a36768b36729533fb44622b35d56d6ad0 (diff) |
Merge branch 'next' into for-linus
Prepare second round of input updates for 4.14 merge window.
Diffstat (limited to 'drivers/input/touchscreen/goodix.c')
-rw-r--r-- | drivers/input/touchscreen/goodix.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index 240b16f3ee97..32d2762448aa 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -267,6 +267,12 @@ static void goodix_process_events(struct goodix_ts_data *ts) if (touch_num < 0) return; + /* + * Bit 4 of the first byte reports the status of the capacitive + * Windows/Home button. + */ + input_report_key(ts->input_dev, KEY_LEFTMETA, point_data[0] & BIT(4)); + for (i = 0; i < touch_num; i++) goodix_ts_report_touch(ts, &point_data[1 + GOODIX_CONTACT_SIZE * i]); @@ -612,6 +618,9 @@ static int goodix_request_input_dev(struct goodix_ts_data *ts) ts->input_dev->id.product = ts->id; ts->input_dev->id.version = ts->version; + /* Capacitive Windows/Home button on some devices */ + input_set_capability(ts->input_dev, EV_KEY, KEY_LEFTMETA); + error = input_register_device(ts->input_dev); if (error) { dev_err(&ts->client->dev, |