Re: [PATCH v2 08/10] regmap: drop regmap_bus::free_on_exit

From: Mark Brown

Date: Thu Nov 19 2026 - 12:00:14 EST


> The SPI and I2C bus helpers kmemdup the static regmap_bus to override
> max_raw_read and max_raw_write per device and mark the copy with
> free_on_exit so that the regmap core frees it. This is the only user of
> free_on_exit, and the per-device limits can instead be applied to the
> map while it is being initialized.

> + void (*init_limits)(struct regmap *map,
> + const struct regmap_config *config);

struct regmap is only available in drivers/base/regmap so this won't be
usable for anything outside there. Taking the maxima as numbers and
passing pointers in might work?

--
Mark Brown <broonie@xxxxxxxxxx>