Re: [PATCH v3 2/2] iio: magnetometer: add driver for MEMSIC MMC5983MA
From: Jonathan Cameron
Date: Sun May 17 2026 - 07:34:29 EST
On Sun, 17 May 2026 09:21:37 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> On Mon, May 11, 2026 at 07:11:35PM +0000, Vladislav Kulikov wrote:
> > Add support for the MEMSIC MMC5983MA 3-axis magnetometer. The driver
> > provides raw magnetic field readings via IIO sysfs with SET/RESET
> > offset cancellation for each measurement.
>
> Good driver, something to improve, though. Jonathan, can you tweak these in
> tree? But perhaps wait a bit for the answer on "why no cache?".
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
>
I tweaked the headers. If we do enable caching can be a follow up patch.
Jonathan
> ...
>
> + arrray_size.h
>
> > +#include <linux/bits.h>
> > +#include <linux/cleanup.h>
> > +#include <linux/delay.h>
>
> + dev_printk.h
> + err.h
>
> > +#include <linux/i2c.h>
> > +#include <linux/iio/iio.h>
> > +#include <linux/mod_devicetable.h>
> > +#include <linux/module.h>
> > +#include <linux/mutex.h>
> > +#include <linux/regmap.h>
> > +#include <linux/time.h>
> > +#include <linux/types.h>
>
> ...
>
> > +static const struct regmap_config mmc5983_regmap_config = {
> > + .name = "mmc5983_regmap",
> > + .reg_bits = 8,
> > + .val_bits = 8,
> > + .max_register = MMC5983_REG_ID,
> > + .writeable_reg = mmc5983_is_writeable_reg,
> > + .readable_reg = mmc5983_is_readable_reg,
> > + .volatile_reg = mmc5983_is_volatile_reg,
> > +};
>
> Why no cache?
>