Re: [PATCH] hwmon: (lm90) Switch channel parsing to fwnode APIs

From: Uwe Kleine-König

Date: Tue Jul 14 2026 - 08:32:57 EST


Hello,

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.

> #include <linux/module.h>
> -#include <linux/of.h>
> +#include <linux/property.h>
> #include <linux/regulator/consumer.h>
> #include <linux/slab.h>
> #include <linux/workqueue.h>

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature