diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2021-11-11 21:58:54 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2021-11-11 21:58:54 -0800 |
commit | efe6f16c6faf724882ddaba2eda8830a87bcc2b2 (patch) | |
tree | ab5a4ac8c5b917b07af95c866770659f330b7f2b /drivers/input/keyboard/tm2-touchkey.c | |
parent | a02dcde595f7cbd240ccd64de96034ad91cffc40 (diff) | |
parent | 744d0090a5f6dfa4c81b53402ccdf08313100429 (diff) |
Merge branch 'next' into for-linus
Prepare input updates for 5.16 merge window.
Diffstat (limited to 'drivers/input/keyboard/tm2-touchkey.c')
-rw-r--r-- | drivers/input/keyboard/tm2-touchkey.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/input/keyboard/tm2-touchkey.c b/drivers/input/keyboard/tm2-touchkey.c index 6218b1c682ef..632cd6c1c8d4 100644 --- a/drivers/input/keyboard/tm2-touchkey.c +++ b/drivers/input/keyboard/tm2-touchkey.c @@ -156,6 +156,8 @@ static irqreturn_t tm2_touchkey_irq_handler(int irq, void *devid) goto out; } + input_event(touchkey->input_dev, EV_MSC, MSC_SCAN, index); + if (data & TM2_TOUCHKEY_BIT_PRESS_EV) { for (i = 0; i < touchkey->num_keycodes; i++) input_report_key(touchkey->input_dev, @@ -250,6 +252,11 @@ static int tm2_touchkey_probe(struct i2c_client *client, touchkey->input_dev->name = TM2_TOUCHKEY_DEV_NAME; touchkey->input_dev->id.bustype = BUS_I2C; + touchkey->input_dev->keycode = touchkey->keycodes; + touchkey->input_dev->keycodemax = touchkey->num_keycodes; + touchkey->input_dev->keycodesize = sizeof(touchkey->keycodes[0]); + + input_set_capability(touchkey->input_dev, EV_MSC, MSC_SCAN); for (i = 0; i < touchkey->num_keycodes; i++) input_set_capability(touchkey->input_dev, EV_KEY, touchkey->keycodes[i]); |