1
0
Fork 0

MLK-16013-12: staging: typec: tcpci: clear pending events before request irq

Clear all possible pending events before request irq.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
pull/10/head
Li Jun 2017-07-27 00:19:55 +08:00 committed by Jason Liu
parent 74b58131ad
commit 0b5a180023
1 changed files with 2 additions and 1 deletions

View File

@ -498,7 +498,8 @@ static int tcpci_probe(struct i2c_client *client,
if (err < 0)
return err;
/* Disable chip interrupts */
/* Clear and disable chip interrupts */
tcpci_write16(tcpci, TCPC_ALERT, 0xffff);
tcpci_write16(tcpci, TCPC_ALERT_MASK, 0);
err = devm_request_threaded_irq(tcpci->dev, client->irq, NULL,