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

From: Guenter Roeck

Date: Tue Jul 14 2026 - 10:49:42 EST


On 7/14/26 05:22, Uwe Kleine-König wrote:
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.


My hwmon-next branch is based off v7.2-rc1 and of_device_id
is declared in mod_devicetable.h.

Guenter