summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorArthur Heymans <arthur.heymans@9elements.com>2021-12-13 17:28:13 +0300
committerGuenter Roeck <linux@roeck-us.net>2021-12-27 02:02:07 +0300
commite65de225ef2f7eade2888b00970eec37aeca0044 (patch)
tree80490d0aaa12f895e0b5edfd4038bf92962f9d6b /drivers/hwmon
parentca003af3aa1574646b784abee861626a52d345ea (diff)
downloadlinux-e65de225ef2f7eade2888b00970eec37aeca0044.tar.xz
hwmon/pmbus: (ir38064) Add of_match_table
Add the missing of_match_table to allow device tree probing. Signed-off-by: Arthur Heymans <arthur.heymans@9elements.com> Link: https://lore.kernel.org/r/20211213142814.264802-3-arthur.heymans@9elements.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/pmbus/ir38064.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/hwmon/pmbus/ir38064.c b/drivers/hwmon/pmbus/ir38064.c
index 4e91d3e54a4a..4211de048069 100644
--- a/drivers/hwmon/pmbus/ir38064.c
+++ b/drivers/hwmon/pmbus/ir38064.c
@@ -16,6 +16,7 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/of_device.h>
#include "pmbus.h"
static struct pmbus_driver_info ir38064_info = {
@@ -50,10 +51,21 @@ static const struct i2c_device_id ir38064_id[] = {
MODULE_DEVICE_TABLE(i2c, ir38064_id);
+static const struct of_device_id ir38064_of_match[] = {
+ { .compatible = "infineon,ir38060" },
+ { .compatible = "infineon,ir38064" },
+ { .compatible = "infineon,ir38164" },
+ { .compatible = "infineon,ir38263" },
+ {}
+};
+
+MODULE_DEVICE_TABLE(of, ir38064_of_match);
+
/* This is the driver that will be inserted */
static struct i2c_driver ir38064_driver = {
.driver = {
.name = "ir38064",
+ .of_match_table = of_match_ptr(ir38064_of_match),
},
.probe_new = ir38064_probe,
.id_table = ir38064_id,