Re: [PATCH v2 2/2] iio: adc: add driver for Texas Instruments TLA2528 adc

From: Andy Shevchenko

Date: Mon Nov 09 2026 - 12:44:32 EST


On Sun, Nov 08, 2026 at 09:32:10AM +0100, Uwe Kleine-König wrote:
> On Sun, Nov 08, 2026 at 01:32:18AM +0000, Jonathan Cameron wrote:
> > On Thu, 5 Nov 2026 16:42:42 +0100
> > Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx> wrote:
> >
> > > On Fri, Oct 30, 2026 at 05:47:04PM +0100, Maxime Chevallier wrote:
> > > > +#include <linux/i2c.h>
> > > > +#include <linux/mod_devicetable.h>
> > >
> > > Please don't include <linux/mod_devicetable.h>. <linux/i2c.h> already
> > > provides i2c_device_id and of_device_id. <linux/mod_devicetable.h>
> > > provides many more *_device_id and thus introduces a big list of
> > > unnecessary dependencies.
> > >
> > > I recommend to just drop <linux/mod_devicetable.h> here. If you insist
> > > on full iwyu, there is <linux/device-id/i2c.h> and
> > > <linux/device-id/of.h>.

It must also imply acpi.h.

> > IWYU is always a bit of a 'roughly' case in the kernel.
> > There are standards assumed sets of this header will always
> > include this other one. I've just started assuming that is
> > always the case for these ones.
>
> Not sure I understand you correctly, but I think it's safe to assume
> that including <linux/i2c.h> will always enough to get a definition of
> the structs i2c_device_id and of_device_id. My preference is also to not
> add includes for <linux/device-id/*.h> in drivers, but opinions differ
> and so I typically point out this possibility.

--
With Best Regards,
Andy Shevchenko