Re: [PATCH v2] hwmon: (lm90) Switch channel parsing to fwnode APIs
From: Guenter Roeck
Date: Sun Jul 19 2026 - 10:06:38 EST
On Fri, Jul 17, 2026 at 09:37:30AM +0300, Flaviu Nistor wrote:
> Replace OF property handling with fwnode 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>
> ---
> Changes in v2:
> - Remove <linux/mod_devicetable.h> as suggested by Uwe Kleine-Konig.
> - Link to v1: https://lore.kernel.org/all/20260713190659.4511-1-flaviu.nistor@xxxxxxxxx/
>
> drivers/hwmon/lm90.c | 47 +++++++++++++++++++++-----------------------
> 1 file changed, 22 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
>
...
> - err = of_property_read_s32(child, "temperature-offset-millicelsius", &val);
> + err = fwnode_property_read_u32(child, "temperature-offset-millicelsius", &val);
I understand you consider it to be irrelevant, but temperature offsets can
be negative. Please explain how this is handled.
Thanks,
Guenter