diff options
| author | Bradford Love <brad@nextdimension.cc> | 2026-03-12 16:35:27 -0500 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-03-17 10:50:19 +0100 |
| commit | 3c414622fe4bcedc48305bfe2170ae13119fc331 (patch) | |
| tree | 8adcb372f954e961e07cf0dc5e0c899aef994fe6 | |
| parent | 69426c6c9bb1601a200dc5dd7ffcc5d542e545b1 (diff) | |
media: si2168: Fix i2c command timeout on embedded platforms
On many embedded platforms i2c responses through USB are not returned
as quickly, plus constantly banging on the i2c master receive essentially
deadlocks the driver. Inserting a 3ms delay between i2c receive calls
and extending the timeout fixes all tested platforms.
Signed-off-by: Bradford Love <brad@nextdimension.cc>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
| -rw-r--r-- | drivers/media/dvb-frontends/si2168.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index c4bbcd127cac..b973d61c3720 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -40,7 +40,7 @@ static int si2168_cmd_execute(struct i2c_client *client, struct si2168_cmd *cmd) if (cmd->rlen) { /* wait cmd execution terminate */ - #define TIMEOUT 70 + #define TIMEOUT 140 timeout = jiffies + msecs_to_jiffies(TIMEOUT); while (!time_after(jiffies, timeout)) { ret = i2c_master_recv(client, cmd->args, cmd->rlen); @@ -54,6 +54,8 @@ static int si2168_cmd_execute(struct i2c_client *client, struct si2168_cmd *cmd) /* firmware ready? */ if ((cmd->args[0] >> 7) & 0x01) break; + + usleep_range(2500, 3500); } dev_dbg(&client->dev, "cmd execution took %d ms\n", |
