diff options
Diffstat (limited to 'chip/it83xx/intc.c')
-rw-r--r-- | chip/it83xx/intc.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/chip/it83xx/intc.c b/chip/it83xx/intc.c index 36a6029f9c..79d738e93c 100644 --- a/chip/it83xx/intc.c +++ b/chip/it83xx/intc.c @@ -81,6 +81,28 @@ static void chip_pd_irq(enum usbpd_port port) task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_PHY_TX_DONE, 0); } +#ifdef IT83XX_INTC_PLUG_IN_SUPPORT + if (USBPD_IS_PLUG_IN_OUT_DETECT(port)) { + /* + * When tcpc detect type-c plug in, then disable + * this interrupt. Because any cc volt changes + * (include pd negotiation) would trigger plug in + * interrupt, frequently plug in interrupt and wakeup + * pd task may cause task starvation or device dead + * (ex.transmit lots SRC_Cap). + * + * When polling disconnect will enable detect type-c + * plug in again. + * + * Clear detect type-c plug in interrupt status. + */ + IT83XX_USBPD_TCDCR(port) |= + (USBPD_REG_PLUG_IN_OUT_DETECT_DISABLE | + USBPD_REG_PLUG_IN_OUT_DETECT_STAT); + task_set_event(PD_PORT_TO_TASK_ID(port), + PD_EVENT_CC, 0); + } +#endif //IT83XX_INTC_PLUG_IN_SUPPORT } } #endif |