[PATCH V5 04/11] iio: imu: inv_icm42607: Add I2C and SPI For icm42607
Andy Shevchenko
andriy.shevchenko at intel.com
Tue May 12 13:06:46 PDT 2026
On Mon, May 11, 2026 at 06:47:15PM +0100, Jonathan Cameron wrote:
> On Sat, 9 May 2026 14:18:58 -0500
> Chris Morgan <macroalpha82 at gmail.com> wrote:
...
> > +static const struct regmap_range_cfg inv_icm42607_regmap_ranges[] = {
> > + {
> > + .name = "user bank",
> > + .range_min = 0x0000,
range_min == 0 is a bug for sure. Yet it may work with current regmap
implementation, it has to be fixed. See, for example, this pending patch:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/ci.git/commit/?h=regmap-warn-range-overlap&id=062bb97410835055036490c96cf77898f90d34ea
> > + .range_max = 0x00FF,
> > + .window_start = 0,
> > + .window_len = 0x0100,
This makes no sense. If you have a page enabled the range max has to be PAGES *
window_len value. This suggests that we have a single page, means no paging is
used. Very confusing.
...
> > +const struct regmap_config inv_icm42607_regmap_config = {
> > + .reg_bits = 8,
> > + .val_bits = 8,
> > + .max_register = 0x00FF,
> > + .ranges = inv_icm42607_regmap_ranges,
> > + .num_ranges = ARRAY_SIZE(inv_icm42607_regmap_ranges),
> > + .cache_type = REGCACHE_NONE,
Why no cache?
> > +};
--
With Best Regards,
Andy Shevchenko
More information about the Linux-rockchip
mailing list