Re: [PATCH] regmap: sdw: check for invalid multi-register writes config

From: Mark Brown
Date: Tue May 23 2023 - 13:26:01 EST


On Tue, May 23, 2023 at 06:13:25PM +0100, Srinivas Kandagatla wrote:
> On 23/05/2023 17:58, Mark Brown wrote:
> > On Tue, May 23, 2023 at 04:47:47PM +0100, Srinivas Kandagatla wrote:

> > > + /* Only bulk writes are supported not multi-register writes */
> > > + if (config->can_multi_write)
> > > + return -ENOTSUPP;

> > This doesn't seem like the right fix - I'd expect us to simply choose
> > not to use multiple writes, with an additional flag/check for bus
> > support.

> Is there a way to check if bus support multi-register writes?

> All I can see from the code is that regmap can_multi_write is set based on
> regmap_config from device and write callback from bus.

No, that'd be the additional flag/check bit - see also my question about
if this is something the hardware actually has or not on the CODEC patch.

Attachment: signature.asc
Description: PGP signature