From b2b3571cb5d2bca8fb953b7fb10c8b7eb039cb36 Mon Sep 17 00:00:00 2001 From: Li Jun Date: Wed, 9 Jan 2019 10:31:01 +0530 Subject: [PATCH] MLK-16013-12: usb: typec: tcpci: clear pending events before request irq Clear all possible pending events before request irq. Reviewed-by: Peter Chen Signed-off-by: Li Jun Signed-off-by: Vipul Kumar --- drivers/usb/typec/tcpci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/typec/tcpci.c b/drivers/usb/typec/tcpci.c index 084709fe9176..e4e227ef5686 100644 --- a/drivers/usb/typec/tcpci.c +++ b/drivers/usb/typec/tcpci.c @@ -576,7 +576,8 @@ static int tcpci_probe(struct i2c_client *client, i2c_set_clientdata(client, chip); - /* Disable chip interrupts before requesting irq */ + /* Clear and disable chip interrupts before requesting irq */ + tcpci_write16(chip->tcpci, TCPC_ALERT, 0xffff); err = regmap_raw_write(chip->data.regmap, TCPC_ALERT_MASK, &val, sizeof(u16)); if (err < 0) -- 2.17.1