mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
usb: typec: tcpci: husb311: fix tx failure
Since the hardware bug of HUSB311, its TX fifo become abnormal when plug in a PD charger after plug out the cable from the PC. As a workaround, we do ResetTransmitBuffer after each TX packet is finished to prepare for the next. Signed-off-by: Frank Wang <frank.wang@rock-chips.com> Change-Id: Ieebd090879a45ee2b5a1720e3debf860712e162c
This commit is contained in:
@@ -207,6 +207,10 @@ static irqreturn_t husb311_irq(int irq, void *dev_id)
|
||||
}
|
||||
}
|
||||
|
||||
/* TCPCI Spec. Table 4-27 ResetTransmitBuffer */
|
||||
if (status & (TCPC_ALERT_TX_SUCCESS | TCPC_ALERT_TX_DISCARDED | TCPC_ALERT_TX_FAILED))
|
||||
husb311_write8(chip, TCPC_COMMAND, 0xdd);
|
||||
|
||||
return tcpci_irq(chip->tcpci);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user