mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
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>
This commit is contained in:
committed by
Guenter Roeck
parent
b0374b52b4
commit
d475fcefbb
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user