summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorin Leotescu <florin.leotescu@nxp.com>2025-03-21 17:33:07 +0300
committerGuenter Roeck <linux@roeck-us.net>2025-03-22 03:07:02 +0300
commit882bd6de1a5b4488dc0747d74420af34d419fd99 (patch)
treedbc9cd2f1eeca174489a3bf389b9e54b72013bcd
parenta25633a00906a59f6e4323f1b5668771c520c7db (diff)
downloadlinux-882bd6de1a5b4488dc0747d74420af34d419fd99.tar.xz
hwmon: emc2305: Add OF support
Introduce OF support for Microchip emc2305 pwm fan controller. Signed-off-by: Florin Leotescu <florin.leotescu@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250321143308.4008623-3-florin.leotescu@oss.nxp.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--drivers/hwmon/emc2305.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hwmon/emc2305.c b/drivers/hwmon/emc2305.c
index 4d39fbd83769..f8a4c76fcadd 100644
--- a/drivers/hwmon/emc2305.c
+++ b/drivers/hwmon/emc2305.c
@@ -607,9 +607,16 @@ static void emc2305_remove(struct i2c_client *client)
emc2305_unset_tz(dev);
}
+static const struct of_device_id of_emc2305_match_table[] = {
+ { .compatible = "microchip,emc2305", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, of_emc2305_match_table);
+
static struct i2c_driver emc2305_driver = {
.driver = {
.name = "emc2305",
+ .of_match_table = of_emc2305_match_table,
},
.probe = emc2305_probe,
.remove = emc2305_remove,