[PATCH v7 5/5] iio: magnetometer: Add mmc5633 sensor

Frank Li Frank.li at nxp.com
Wed Oct 29 08:54:39 PDT 2025


On Tue, Oct 28, 2025 at 12:50:55PM +0200, Andy Shevchenko wrote:
> On Mon, Oct 27, 2025 at 04:08:33PM -0400, Frank Li wrote:

After update patch, I met some problem, so reply at prevous your email.

> > +	struct device *dev;
> > +	struct i3c_device *i3cdev;
> > +	struct mutex mutex; /* protect to finish one whole measurement */
> > +	struct regmap *regmap;
>
> regmap has struct device, i3c_device presumable also, and here is struct
> device. Don't we have some overhead?

*dev already removed. i3cdev is kept as my reply at yesterday.

>
> > +static const struct {
> > +   int val;
> > +   int val2;
>
> No need. Just
>
> > +} mmc5633_samp_freq[] = {

There are some place will like

        if (mmc5633_samp_freq[i][0] == val &&
                mmc5633_samp_freq[i][1] == val2)

previous
        if (mmc5633_samp_freq[i].val == val &&
                mmc5633_samp_freq[i].val2 == val2)

Previous version seem have better readablity. But it is not big deal, if
you like, I change to [0][1].

>
> struct i3c_device doesn't have a name, does it?

It has name, but it is hexnumber (VID+PID), like 0-4a20000f000.
So use friend/readable name here.

Frank

>
> --
> With Best Regards,
> Andy Shevchenko
>
>



More information about the linux-i3c mailing list