hwmon: (amc6821) add of_match table
authorJosua Mayer <josua@solid-run.com>
Thu, 7 Mar 2024 11:06:58 +0000 (12:06 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 7 Mar 2024 17:17:40 +0000 (09:17 -0800)
commit3f003fda98a7a8d5f399057d92e6ed56b468657c
tree2df129f0fdc66c8d3a18424be056ffb95b6f53a1
parent78cc80d834ed3b792605bc9c2215ed9e63825459
hwmon: (amc6821) add of_match table

Add of_match table for "ti,amc6821" compatible string.
This fixes automatic driver loading by userspace when using device-tree,
and if built as a module like major linux distributions do.

While devices probe just fine with i2c_device_id table, userspace can't
match the "ti,amc6821" compatible string from dt with the plain
"amc6821" device id. As a result, the kernel module can not be loaded.

Cc: stable@vger.kernel.org
Signed-off-by: Josua Mayer <josua@solid-run.com>
Link: https://lore.kernel.org/r/20240307-amc6821-of-match-v1-1-5f40464a3110@solid-run.com
[groeck: Cleaned up patch description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/amc6821.c