usb-c: tcpc: Correctly detect Hard Reset sent detection

The Hard Reset sent signal was tested twice in the same
"if else" structure but only handled in the last test. This
change removes the first detection so that Hard Reset can
be correctly detected.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
This commit is contained in:
Sam Hurst 2023-01-21 20:08:36 -08:00 committed by Carles Cufí
commit 603ac13145

View file

@ -1135,7 +1135,7 @@ static void ucpd_isr(const struct device *dev_inst[])
*/
if (sr & tx_done_mask) {
/* Check for tx message complete */
if (sr & (UCPD_SR_TXMSGSENT | UCPD_SR_HRSTSENT)) {
if (sr & UCPD_SR_TXMSGSENT) {
atomic_set_bit(&info->evt, UCPD_EVT_TX_MSG_SUCCESS);
} else if (sr & (UCPD_SR_TXMSGABT | UCPD_SR_TXUND)) {
atomic_set_bit(&info->evt, UCPD_EVT_TX_MSG_FAIL);