diff options
| author | Matti Vaittinen <mazziesaccount@gmail.com> | 2026-06-26 10:24:21 +0300 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-08-10 08:59:40 -0700 |
| commit | d475fcefbb145b7cd0ebacf17a1def2ff65148a7 (patch) | |
| tree | f07a962d128ed0611f6864201a4601fa839506eb | |
| parent | b0374b52b4b56034d46897d00f72dd4351e9a433 (diff) | |
hwmon: (pmbus/adm1275) Support module auto-loading
Populating the i2c_device_id -table is not enough to make the
driver module automatically load when device-tree node for the
power-monitor is parsed at boot.
Adding the of_device_id tables causes the driver module to be
automatically load at boot. Testing has been done with rather old Debian
system.
When inspecting the generated module-aliases with the insmod, following
entries seem to be the difference:
alias: of:N*T*Cadi,adm1075C*
alias: of:N*T*Cadi,adm1075
I suspect these are required for the module loading to work.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/9eca6831f9fe2d781bb88337397c39b10e36f5c6.1782458224.git.mazziesaccount@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| -rw-r--r-- | drivers/hwmon/pmbus/adm1275.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/hwmon/pmbus/adm1275.c b/drivers/hwmon/pmbus/adm1275.c index d3c3ff85dba3..0a8b32218573 100644 --- a/drivers/hwmon/pmbus/adm1275.c +++ b/drivers/hwmon/pmbus/adm1275.c @@ -870,9 +870,25 @@ static int adm1275_probe(struct i2c_client *client) return pmbus_do_probe(client, info); } +static const struct of_device_id adm1275_of_match[] = { + { .compatible = "adi,adm1075", }, + { .compatible = "adi,adm1272", }, + { .compatible = "adi,adm1273", }, + { .compatible = "adi,adm1275", }, + { .compatible = "adi,adm1276", }, + { .compatible = "adi,adm1278", }, + { .compatible = "adi,adm1281", }, + { .compatible = "adi,adm1293", }, + { .compatible = "adi,adm1294", }, + { .compatible = "silergy,mc09c", }, + { } +}; +MODULE_DEVICE_TABLE(of, adm1275_of_match); + static struct i2c_driver adm1275_driver = { .driver = { .name = "adm1275", + .of_match_table = adm1275_of_match, }, .probe = adm1275_probe, .id_table = adm1275_id, |
