1
0
Fork 0

LF-175: input: keyboard: imx_sc_pwrkey: fix no release event reported

scfw only take care of the least 1 byte of payload of powerkey message.
Correct key state checking logic, otherwise, the state maybe wrong since
the upper 3 bytes maybe not 0 as expected.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Robin Gong 2019-11-29 02:39:13 +08:00
parent 1a05978da9
commit f38cc79e02
1 changed files with 2 additions and 1 deletions

View File

@ -86,7 +86,8 @@ static void imx_sc_check_for_events(struct work_struct *work)
*/
imx_scu_call_rpc(pdata->ipcHandle, &msg, true);
state = (bool)msg.state;
/* Only care the least 1 byte */
state = (bool)(msg.state & 0xff);
/*
* restore status back if press interrupt received but pin's status
* released, which caused by pressing so quickly.