Skip to content

Commit e65de22

Browse files
ArthurHeymansgroeck
authored andcommitted
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>
1 parent ca003af commit e65de22

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

drivers/hwmon/pmbus/ir38064.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/init.h>
1717
#include <linux/kernel.h>
1818
#include <linux/module.h>
19+
#include <linux/of_device.h>
1920
#include "pmbus.h"
2021

2122
static struct pmbus_driver_info ir38064_info = {
@@ -50,10 +51,21 @@ static const struct i2c_device_id ir38064_id[] = {
5051

5152
MODULE_DEVICE_TABLE(i2c, ir38064_id);
5253

54+
static const struct of_device_id ir38064_of_match[] = {
55+
{ .compatible = "infineon,ir38060" },
56+
{ .compatible = "infineon,ir38064" },
57+
{ .compatible = "infineon,ir38164" },
58+
{ .compatible = "infineon,ir38263" },
59+
{}
60+
};
61+
62+
MODULE_DEVICE_TABLE(of, ir38064_of_match);
63+
5364
/* This is the driver that will be inserted */
5465
static struct i2c_driver ir38064_driver = {
5566
.driver = {
5667
.name = "ir38064",
68+
.of_match_table = of_match_ptr(ir38064_of_match),
5769
},
5870
.probe_new = ir38064_probe,
5971
.id_table = ir38064_id,

0 commit comments

Comments
 (0)