Re: [PATCH 2/2] iio: adc: Add rtq6056 support

From: Andy Shevchenko
Date: Sun Jun 19 2022 - 06:39:00 EST


On Sat, Jun 18, 2022 at 5:16 PM ChiYuan Huang <u0084500@xxxxxxxxx> wrote:
> Andy Shevchenko <andy.shevchenko@xxxxxxxxx> 於 2022年6月18日 週六 凌晨1:08寫道:
> > On Fri, Jun 17, 2022 at 11:37 AM cy_huang <u0084500@xxxxxxxxx> wrote:

...

> > > +KernelVersion: 5.18.2
> >
> > Wrong version, this won't be part of a stable kernel.
> >
> From kernel.org, currently the stable kernel version is 5.18.5.
> Change to 5.18.5?

Nope. You need to use realistic kernel version, and as I said it can't
be a stable one.

...

> > But for sure you missed

> > types.h
> >
> Ack in next. But for types.h, i2c.h already include device.h.
> And device.h already include types.h.
> Is it still needed to declare explicitly for types.h??

Yes. You have to include all headers you are a direct user of, except
the ones that are guaranteed to be included by others. The types.h is
not guaranteed to be included by listed above.

...

> > > + struct device *dev;
> > > + struct regmap *regmap;
> >
> > Swapping these two might give less code in the generated binary. Have
> > you run bloat-o-meter?
> >
> I never know about this tool.
> I'll check it before I submit the next revision.
> Thanks for the reminding.
>
> But from Jonathan's reply, I may remove 'struct regmap *regmap'.
> If all function need the 'regmap', a local variable 'regmap' need to
> be declared.
> To use struct regmap *regmap = dev_get_regmap(dev, NULL) is more effective.

It's fine, but you may experiment with bloat-o-meter even in that case
out of curiosity.

--
With Best Regards,
Andy Shevchenko