Re: [PATCH] hwmon: (lm90) Switch channel parsing to fwnode APIs
From: Uwe Kleine-König
Date: Tue Jul 14 2026 - 13:09:21 EST
Hello Guenter,
On Tue, Jul 14, 2026 at 07:43:13AM -0700, Guenter Roeck wrote:
> On 7/14/26 05:22, Uwe Kleine-König wrote:
> > On Mon, Jul 13, 2026 at 10:06:59PM +0300, Flaviu Nistor wrote:
> > > Replace OF property handling with fwnode API in the probe function to read
> > > the channels properties, improving the driver compatibility since this
> > > method is not limited to Device Tree only.
> > > Add also the needed headers for explicit include and clean up related
> > > function naming.
> > >
> > > Signed-off-by: Flaviu Nistor <flaviu.nistor@xxxxxxxxx>
> > > ---
> > > drivers/hwmon/lm90.c | 48 +++++++++++++++++++++-----------------------
> > > 1 file changed, 23 insertions(+), 25 deletions(-)
> > >
> > > diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
> > > index 4b9c0ccdf260..045977e30cf4 100644
> > > --- a/drivers/hwmon/lm90.c
> > > +++ b/drivers/hwmon/lm90.c
> > > @@ -101,14 +101,16 @@
> > > #include <linux/bits.h>
> > > #include <linux/device.h>
> > > #include <linux/err.h>
> > > +#include <linux/fwnode.h>
> > > #include <linux/i2c.h>
> > > #include <linux/init.h>
> > > #include <linux/interrupt.h>
> > > #include <linux/jiffies.h>
> > > #include <linux/hwmon.h>
> > > #include <linux/kstrtox.h>
> > > +#include <linux/mod_devicetable.h>
> >
> > <linux/mod_devicetable.h> is going away soon. Please rely on
> > <linux/i2c.h> to provide of_device_id.
>
> My hwmon-next branch is based off v7.2-rc1 and of_device_id
> is declared in mod_devicetable.h.
That sounds factual correct.
If you want to imply with that statement that my recommendation is
wrong, annoying or in other ways unsuitable to you I guess you either
have to be more explicit or live with it.
<linux/i2c.h> provides i2c_driver which uses of_device_id (via struct
device_driver) and thus includes a header that provides that struct.
That won't change in the foreseeable future. If that is not good enough
for you, find means to handle that in another way.
Best regards
Uwe
Attachment:
signature.asc
Description: PGP signature