Re: [PATCH v3 1/3] ASoC: codecs: nau8360: set val_bits to the widest register size

From: Raffaele Tranfaglia

Date: Sun Dec 06 2026 - 07:12:40 EST


On Thu, 3 Dec 2026 at 10:04, Andy Shevchenko
<andriy.shevchenko@xxxxxxxxx> wrote:
> I was asking last round (and sorry if I don't remember the answer) if we can
> use val_bits == 0 in this case like other custom cases use?

val_bits == 0 would work for the writes, but the users I found that
leave it at 0 (ad4130, ad4170-4, phy-cadence-sierra) have no cache,
while nau8360 uses a maple cache. With val_bits == 0, cache_word_size
and val_bytes become 0: the debugfs registers file prints the values
with a width of 2 * val_bytes, so they would disappear from the dump,
and regcache_get_val()/regcache_set_val() BUG() on a word size of 0.
nau8360 does not reach those today since it has no raw bus, but it
seems fragile, so I would prefer to keep val_bits = 32, the size of the
widest register.

Best regards,
Raffaele