[PATCH v8 02/10] mfd: nxp-siul2: add support for NXP SIUL2
Sander Vanheule
sander at svanheule.net
Thu Jan 22 10:52:57 PST 2026
Hi Khristine,
On Tue, 2026-01-20 at 13:59 +0200, Khristine Andreea Barbulescu wrote:
> +static const struct regmap_config nxp_siul2_regmap_pgpdo_conf = {
> + .val_bits = 16,
> + .val_format_endian = REGMAP_ENDIAN_LITTLE,
> + .reg_bits = 32,
> + .reg_stride = 2,
> + .cache_type = REGCACHE_FLAT,
> + .use_raw_spinlock = true,
> +};
I see you are using REGCACHE_FLAT ...
> + if (tmp_conf.cache_type != REGCACHE_NONE)
> + tmp_conf.num_reg_defaults_raw =
> + 1 + tmp_conf.max_register /
> tmp_conf.reg_stride;
... and initialize the cache defaults from hardware.
This series predates the addition of REGCACHE_FLAT_S in v6.19 with commit
9c7f7262bc1a ("regmap: add flat cache with sparse validity"), but I think
switching to the sparse flat cache would allow you to drop this. Then the cache
will just be initialized on the first hardware access instead of at regmap init.
Best,
Sander
More information about the linux-arm-kernel
mailing list