From: Marc Dietrich Date: Sat, 3 Jan 2026 10:14:39 +0000 (+0100) Subject: staging: nvec: apply udelay only after the first byte has been sent X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db9b736bce3dd897fe4602c8279f9811112fd82a;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://patch.msgid.link/20260103101439.14863-1-marvin24@gmx.de Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 263774e6a78c..e9af66a08448 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c @@ -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;