Input: mpr121 - set missing event capability
authorAkinobu Mita <akinobu.mita@gmail.com>
Sun, 15 Jan 2017 22:44:05 +0000 (14:44 -0800)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 12:03:30 +0000 (14:03 +0200)
commit 9723ddc8fe0d76ce41fe0dc16afb241ec7d0a29d upstream.

This driver reports misc scan input events on the sensor's status
register changes.  But the event capability for them was not set in the
device initialization, so these events were ignored.

This change adds the missing event capability.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Oliver Neukum <ONeukum@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/input/keyboard/mpr121_touchkey.c

index d781d532c37e7543b8afb2dcb0fded2c9eb5b205..e13713b7658c52482368d077bc421394e7d1e0f7 100644 (file)
@@ -235,6 +235,7 @@ static int mpr_touchkey_probe(struct i2c_client *client,
        input_dev->id.bustype = BUS_I2C;
        input_dev->dev.parent = &client->dev;
        input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP);
+       input_set_capability(input_dev, EV_MSC, MSC_SCAN);
 
        input_dev->keycode = mpr121->keycodes;
        input_dev->keycodesize = sizeof(mpr121->keycodes[0]);