]> git.baikalelectronics.ru Git - kernel.git/commit
Input: imx_sc_key - only take the valid data from SCU firmware as key state
authorAnson Huang <Anson.Huang@nxp.com>
Fri, 13 Dec 2019 22:02:30 +0000 (14:02 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 14 Dec 2019 00:41:57 +0000 (16:41 -0800)
commit3ed96d7894b05124c389d83dc685c69e52a9a7f8
treeb1c3dd4f0ad5fdc0407e933e4055e109fbb58427
parent6d36c59c37ad9c4b7f42118bbeaa9e3d79ae99ee
Input: imx_sc_key - only take the valid data from SCU firmware as key state

When reading key state from SCU, the response data from SCU firmware
is 4 bytes due to MU message protocol, but ONLY the first byte is the
key state, other 3 bytes could be some dirty data, so we should ONLY
take the first byte as key state to avoid reporting incorrect state.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Fixes: cea3408eaf0b ("Input: keyboard - imx_sc: Add i.MX system controller key support")
Link: https://lore.kernel.org/r/1576202909-1661-1-git-send-email-Anson.Huang@nxp.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/imx_sc_key.c