Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210729230543.2853485-2-linus.walleij@linaro.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Linus Walleij and committed by
Guenter Roeck
2284ed9f 542613a2

+11
+11
drivers/hwmon/w83781d.c
··· 1571 1571 }; 1572 1572 MODULE_DEVICE_TABLE(i2c, w83781d_ids); 1573 1573 1574 + static const struct of_device_id w83781d_of_match[] = { 1575 + { .compatible = "winbond,w83781d" }, 1576 + { .compatible = "winbond,w83781g" }, 1577 + { .compatible = "winbond,w83782d" }, 1578 + { .compatible = "winbond,w83783s" }, 1579 + { .compatible = "asus,as99127f" }, 1580 + { }, 1581 + }; 1582 + MODULE_DEVICE_TABLE(of, w83781d_of_match); 1583 + 1574 1584 static struct i2c_driver w83781d_driver = { 1575 1585 .class = I2C_CLASS_HWMON, 1576 1586 .driver = { 1577 1587 .name = "w83781d", 1588 + .of_match_table = w83781d_of_match, 1578 1589 }, 1579 1590 .probe_new = w83781d_probe, 1580 1591 .remove = w83781d_remove,