Re: [PATCH] regmap: sdw-mbq: don't call an unset readable_reg callback

From: Charles Keepax

Date: Wed Aug 12 2026 - 05:24:59 EST


On Tue, Aug 11, 2026 at 10:14:35PM +0300, Andrey Golovko wrote:
> regmap_sdw_mbq_poll_busy() decides whether to poll the Function Busy bit
> by calling ctx->readable_reg(), which is a straight copy of
> config->readable_reg. That callback is optional: regmap_readable() treats
> a NULL ->readable_reg as "every register is readable", and drivers rely on
> that. es9356 and tac5xx2-sdw both build an MBQ regmap without one.
>
> Since commit ca1b11b36d82 ("regmap: sdw-mbq: Allow defers on undeferrable
> controls") the poll runs on every -ENODATA, not only for Controls the
> driver marked deferrable, so any of those devices answering
> COMMAND_IGNORED takes the kernel through a NULL function pointer.
>
> Treat a missing callback the way the rest of regmap does and poll.
>
> Fixes: 5bc493bf0c37 ("regmap: sdw-mbq: Add support for SDCA deferred controls")
> Signed-off-by: Andrey Golovko <andrey.golovko@xxxxxxxxx>
> ---

Reviewed-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Thanks,
Charles