mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 16:53:20 -04:00
regmap: sdw-mbq: Fix swap of timeout and retry times
When polling Function Busy using read_poll_timeout() the total timeout
and retry delay arguments are swapped. This leads to only a single retry
being processed, it seems the existing users typically do succeed before
the first retry.
Swap the arguments over to ensure the correct polling time.
Reported-by: Ville Saarinen <wiza@saarinenkoti.fi>
Link: https://lore.kernel.org/linux-sound/ansTPGgVNoDJlA5r@opensource.cirrus.com/T/#m680731a2f307f1f5176b27ed5aa560ddc94e5d62
Fixes: 5bc493bf0c ("regmap: sdw-mbq: Add support for SDCA deferred controls")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260811131816.332082-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
4b05ccb17f
commit
ae7fd6ff4c
@@ -59,7 +59,7 @@ static int regmap_sdw_mbq_poll_busy(struct sdw_slave *slave, unsigned int reg,
|
||||
if (ctx->readable_reg(dev, reg)) {
|
||||
ret = read_poll_timeout(sdw_read_no_pm, val,
|
||||
val < 0 || !(val & SDCA_CTL_ENTITY_0_FUNCTION_BUSY),
|
||||
ctx->cfg.timeout_us, ctx->cfg.retry_us,
|
||||
ctx->cfg.retry_us, ctx->cfg.timeout_us,
|
||||
false, slave, reg);
|
||||
if (val < 0)
|
||||
return val;
|
||||
|
||||
Reference in New Issue
Block a user