[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQjQ4jsG6Gc2u3n+@lizhi-Precision-Tower-5810>
Date: Mon, 3 Nov 2025 10:57:22 -0500
From: Frank Li <Frank.li@....com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>,
	Miquel Raynal <miquel.raynal@...tlin.com>,
	Jonathan Cameron <jic23@...nel.org>,
	David Lechner <dlechner@...libre.com>,
	Nuno Sá <nuno.sa@...log.com>,
	Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, linux-i3c@...ts.infradead.org,
	linux-kernel@...r.kernel.org, imx@...ts.linux.dev,
	linux-iio@...r.kernel.org, joshua.yeong@...rfivetech.com,
	devicetree@...r.kernel.org, linux@...ck-us.net,
	Carlos Song <carlos.song@....com>,
	Adrian Fluturel <fluturel.adrian@...il.com>
Subject: Re: [PATCH v9 6/6] iio: magnetometer: Add mmc5633 sensor
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
>
>
Powered by blists - more mailing lists