Commit 2284ed9f authored by Linus Walleij's avatar Linus Walleij Committed by Guenter Roeck

hwmon: (w83781d) Match on device tree compatibles

I2C devices should match on the proper compatible string.
This is already used in one device tree in the kernel (MIPS)
so let's add the matches.
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210729230543.2853485-2-linus.walleij@linaro.orgSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 542613a2
......@@ -1571,10 +1571,21 @@ static const struct i2c_device_id w83781d_ids[] = {
};
MODULE_DEVICE_TABLE(i2c, w83781d_ids);
static const struct of_device_id w83781d_of_match[] = {
{ .compatible = "winbond,w83781d" },
{ .compatible = "winbond,w83781g" },
{ .compatible = "winbond,w83782d" },
{ .compatible = "winbond,w83783s" },
{ .compatible = "asus,as99127f" },
{ },
};
MODULE_DEVICE_TABLE(of, w83781d_of_match);
static struct i2c_driver w83781d_driver = {
.class = I2C_CLASS_HWMON,
.driver = {
.name = "w83781d",
.of_match_table = w83781d_of_match,
},
.probe_new = w83781d_probe,
.remove = w83781d_remove,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment