* [PATCH v2] hwmon: (adt7462) Add of_match_table to support devicetree
@ 2026-06-08 15:23 Romain Gantois
2026-06-08 15:32 ` sashiko-bot
2026-06-08 16:23 ` Guenter Roeck
0 siblings, 2 replies; 3+ messages in thread
From: Romain Gantois @ 2026-06-08 15:23 UTC (permalink / raw)
To: Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Kory Maincent
Cc: Thomas Petazzoni, linux-hwmon, devicetree, linux-kernel,
Romain Gantois
From: Kory Maincent <kory.maincent@bootlin.com>
Add of_match_table to add support of devicetree probing.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
[rgantois: Removed of_match_ptr().]
Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
---
Changes in v2:
- Dropped usage of of_match_ptr().
- Removed redundant device tree bindings.
- Link to v1: https://patch.msgid.link/20260603-adt7462-bindings-v1-0-301304bcf774@bootlin.com
To: Guenter Roeck <linux@roeck-us.net>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: linux-hwmon@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/hwmon/adt7462.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/hwmon/adt7462.c b/drivers/hwmon/adt7462.c
index 174dfee47f7a7..f935c3477b364 100644
--- a/drivers/hwmon/adt7462.c
+++ b/drivers/hwmon/adt7462.c
@@ -12,6 +12,7 @@
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/err.h>
+#include <linux/mod_devicetable.h>
#include <linux/mutex.h>
#include <linux/log2.h>
#include <linux/slab.h>
@@ -1814,10 +1815,17 @@ static const struct i2c_device_id adt7462_id[] = {
};
MODULE_DEVICE_TABLE(i2c, adt7462_id);
+static const struct of_device_id adt7462_of_match[] = {
+ { .compatible = "onnn,adt7462" },
+ { },
+};
+MODULE_DEVICE_TABLE(of, adt7462_of_match);
+
static struct i2c_driver adt7462_driver = {
.class = I2C_CLASS_HWMON,
.driver = {
.name = "adt7462",
+ .of_match_table = adt7462_of_match,
},
.probe = adt7462_probe,
.id_table = adt7462_id,
---
base-commit: ddd664bbff63e09e7a7f9acae9c43605d4cf185f
change-id: 20260603-adt7462-bindings-5ecf3037040f
Best regards,
--
Romain Gantois <romain.gantois@bootlin.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] hwmon: (adt7462) Add of_match_table to support devicetree
2026-06-08 15:23 [PATCH v2] hwmon: (adt7462) Add of_match_table to support devicetree Romain Gantois
@ 2026-06-08 15:32 ` sashiko-bot
2026-06-08 16:23 ` Guenter Roeck
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-06-08 15:32 UTC (permalink / raw)
To: Romain Gantois; +Cc: linux-hwmon, conor+dt, devicetree, robh
> From: Kory Maincent <kory.maincent@bootlin.com>
>
> Add of_match_table to add support of devicetree probing.
>
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> [rgantois: Removed of_match_ptr().]
> Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260608-adt7462-bindings-v2-1-272982c40325@bootlin.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] hwmon: (adt7462) Add of_match_table to support devicetree
2026-06-08 15:23 [PATCH v2] hwmon: (adt7462) Add of_match_table to support devicetree Romain Gantois
2026-06-08 15:32 ` sashiko-bot
@ 2026-06-08 16:23 ` Guenter Roeck
1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2026-06-08 16:23 UTC (permalink / raw)
To: Romain Gantois
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kory Maincent,
Thomas Petazzoni, linux-hwmon, devicetree, linux-kernel
On Mon, Jun 08, 2026 at 05:23:43PM +0200, Romain Gantois wrote:
> From: Kory Maincent <kory.maincent@bootlin.com>
>
> Add of_match_table to add support of devicetree probing.
>
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> [rgantois: Removed of_match_ptr().]
> Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-08 16:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-08 15:23 [PATCH v2] hwmon: (adt7462) Add of_match_table to support devicetree Romain Gantois
2026-06-08 15:32 ` sashiko-bot
2026-06-08 16:23 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox