From 1795baa47428b03b21bd63732b3febdd6b118f73 Mon Sep 17 00:00:00 2001 From: Li Jun Date: Wed, 9 Jan 2019 14:41:51 +0530 Subject: [PATCH] MLK-17077 usb: typec: clear vbus change event in irq handler For vbus change event, we need read the vbus status to clear the alert. Current code do this in queue work, this has problem on single core running, the queue work of vbus change may have no chance to be scheduled as we continue receive the vbus change event in threaded irq. Acked-by: Peter Chen Signed-off-by: Li Jun Signed-off-by: Vipul Kumar --- drivers/usb/typec/tcpci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/typec/tcpci.c b/drivers/usb/typec/tcpci.c index 65846130bf25..be905a2eebb2 100644 --- a/drivers/usb/typec/tcpci.c +++ b/drivers/usb/typec/tcpci.c @@ -581,6 +581,9 @@ irqreturn_t tcpci_irq(struct tcpci *tcpci) tcpm_cc_change(tcpci->port); if (status & TCPC_ALERT_POWER_STATUS) { + /* Read power status to clear the event */ + regmap_read(tcpci->regmap, TCPC_POWER_STATUS, ®); + regmap_read(tcpci->regmap, TCPC_POWER_STATUS_MASK, ®); /* -- 2.17.1