Re: [PATCH v2 1/3] ASoC: codecs: nau8360: set val_bits to the widest register size
From: Andy Shevchenko
Date: Wed Nov 25 2026 - 08:25:36 EST
On Wed, Nov 25, 2026 at 08:09:30AM +0000, Raffaele Tranfaglia via B4 Relay wrote:
>
> The regmap is configured with val_bits = 16, but the two DSP registers
> are 32 bits wide: nau8360_reg_write() sends four bytes for them, and the
> DSP messages written with snd_soc_component_write() use all 32 bits.
>
> This works because the driver provides its own reg_read() and
> reg_write() and regmap passes the value through unmodified. As regmap is
> going to mask values to val_bits, set it to 32, the size of the widest
> register. The size of each access is still selected in the driver's
> reg_read() and reg_write().
Hmm... While it works, it might be not the best approach. In cases like this
elsewhere we create two regmaps (one per each val_bits size) and choose them
based on the register offset.
--
With Best Regards,
Andy Shevchenko