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
parent
1a05978da9
commit
f38cc79e02
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue