[PATCH v9 6/6] iio: magnetometer: Add mmc5633 sensor
Frank Li
Frank.li at nxp.com
Mon Nov 3 07:57:22 PST 2025
On Mon, Nov 03, 2025 at 10:13:58AM +0200, Andy Shevchenko wrote:
> On Fri, Oct 31, 2025 at 12:39:18PM -0400, Frank Li wrote:
> > Add mmc5633 sensor basic support.
> > - Support read 20 bits X/Y/Z magnetic.
> > - Support I3C HDR mode to send start measurememt command.
> > - Support I3C HDR mode to read all sensors data by one command.
>
> ...
>
> > - 1 -> ARRAY_SIZE()
>
> Maybe I missed the answer, but why are the arrays to begin with?
>
I3C/I2C transfer API required pass down one array. Keep the same coding
style with existed one, like
source/drivers/base/regmap/regmap-i3c.c
> ...
>
> > +#define MMC5633_REG_YOUT_H 0x03
> > +#define MMC5633_REG_ZOUT_L 0x04
> > +#define MMC5633_REG_ZOUT_H 0x05
> > +#define MMC5633_REG_XOUT_2 0x06
> > +#define MMC5633_REG_YOUT_2 0x07
> > +#define MMC5633_REG_ZOUT_2 0x08
> > +#define MMC5633_REG_TOUT 0x09
>
> Are those _L, _H, _2 come from the datasheet
I will align datasheet, which use 0, 1, 2.
>
>
> > + ret = regmap_attach_dev(dev, regmap, &mmc5633_regmap_config);
> > + if (ret)
> > + return ret;
>
> Why?
I double check code, it should already called in __regmap_init(). It should
be reduntant.
Frank
>
> ...
>
> > + ret = regmap_attach_dev(dev, regmap, &mmc5633_regmap_config);
> > + if (ret)
> > + return ret;
>
>
> Ditto.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
More information about the linux-i3c
mailing list