Pull regmap fixes from Mark Brown: "A couple more fixes for regmap, this time for the SoundWire MBQ support: - Several drivers omit the readable_reg callback and it's generally optional in regmap but the MBQ code had an assumption that one was present added in one of the APIs, remove that - The timeout and retry intervals were swapped in read_poll_timeout() for soundwire-mbq" * tag 'regmap-fix-v7.2-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: sdw-mbq: don't call an unset readable_reg callback regmap: sdw-mbq: Fix swap of timeout and retry times
Unified · Split
| @@ -56,10 +56,10 @@ static int regmap_sdw_mbq_poll_busy(struct sdw_slave *slave, unsigned int reg, · 55 unmodified lines | |||
| 56 | reg = SDW_SDCA_CTL(SDW_SDCA_CTL_FUNC(reg), 0, | 56 | reg = SDW_SDCA_CTL(SDW_SDCA_CTL_FUNC(reg), 0, |
| 57 | SDCA_CTL_ENTITY_0_FUNCTION_STATUS, 0); | 57 | SDCA_CTL_ENTITY_0_FUNCTION_STATUS, 0); |
| 58 | 58 | ||
| 59 | if (ctx->readable_reg(dev, reg)) { | 59 | if (!ctx->readable_reg || ctx->readable_reg(dev, reg)) { |
| 60 | ret = read_poll_timeout(sdw_read_no_pm, val, | 60 | ret = read_poll_timeout(sdw_read_no_pm, val, |
| 61 | val < 0 || !(val & SDCA_CTL_ENTITY_0_FUNCTION_BUSY), | 61 | val < 0 || !(val & SDCA_CTL_ENTITY_0_FUNCTION_BUSY), |
| 62 | ctx->cfg.timeout_us, ctx->cfg.retry_us, | 62 | ctx->cfg.retry_us, ctx->cfg.timeout_us, |
| 63 | false, slave, reg); | 63 | false, slave, reg); |
| 64 | if (val < 0) | 64 | if (val < 0) |
| 65 | return val; | 65 | return val; |