summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2020-12-09 17:59:53 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 11:51:30 +0100
commitf252a99532498a55e47f2c3d5d319a530da0268e (patch)
tree1ab5ee90d6f79b5992d132f2dc1b071a77f58bd6 /drivers
parent2686041cef066d54927185451d1b5aa4246cfdcf (diff)
downloadlinux-stable-f252a99532498a55e47f2c3d5d319a530da0268e.tar.gz
linux-stable-f252a99532498a55e47f2c3d5d319a530da0268e.tar.bz2
linux-stable-f252a99532498a55e47f2c3d5d319a530da0268e.zip
Input: cros_ec_keyb - send 'scancodes' in addition to key events
[ Upstream commit 80db2a087f425b63f0163bc95217abd01c637cb5 ] To let userspace know what 'scancodes' should be used in EVIOCGKEYCODE and EVIOCSKEYCODE ioctls, we should send EV_MSC/MSC_SCAN events in addition to EV_KEY/KEY_* events. The driver already declared MSC_SCAN capability, so it is only matter of actually sending the events. Link: https://lore.kernel.org/r/X87aOaSptPTvZ3nZ@google.com Acked-by: Rajat Jain <rajatja@google.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/keyboard/cros_ec_keyb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index 8d4d9786cc74..cae262b6ff39 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -183,6 +183,7 @@ static void cros_ec_keyb_process(struct cros_ec_keyb *ckdev,
"changed: [r%d c%d]: byte %02x\n",
row, col, new_state);
+ input_event(idev, EV_MSC, MSC_SCAN, pos);
input_report_key(idev, keycodes[pos],
new_state);
}