staging: nvec: apply udelay only after the first byte has been sent

Due to a HW bug in the Tegra20 SoC a udelay needs to be added after
the first byte has been sent to the EC (I2C master). Move it to the
correct position and add a comment that it should not be replaced by
usleep_range.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Link: https://patch.msgid.link/20260103101439.14863-1-marvin24@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Marc Dietrich
2026-01-03 11:14:39 +01:00
committed by Greg Kroah-Hartman
parent 42d8dc5a9d
commit db9b736bce

View File

@@ -648,7 +648,6 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
break;
case 2: /* first byte after command */
if (status == (I2C_SL_IRQ | RNW | RCVD)) {
udelay(33);
if (nvec->rx->data[0] != 0x01) {
dev_err(nvec->dev,
"Read without prior read command\n");
@@ -660,6 +659,9 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
nvec_tx_set(nvec);
to_send = nvec->tx->data[0];
nvec->tx->pos = 1;
/* delay ACK due to AP20 HW Bug
do not replace by usleep_range */
udelay(33);
} else if (status == (I2C_SL_IRQ)) {
nvec->rx->data[1] = received;
nvec->rx->pos = 2;