Skip to content
Commit d560168b authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: (core) New hwmon registration API



Up to now, each hwmon driver has to implement its own sysfs attributes.
This requires a lot of template code, and distracts from the driver's core
function to read and write chip registers.

To be able to reduce driver complexity, move sensor attribute handling
and thermal zone registration into hwmon core. By using the new API,
driver code and data size is typically reduced by 20-70%, depending
on driver complexity and the number of sysfs attributes supported.

With this patch, the new API only supports thermal sensors. Support for
other sensor types will be added with subsequent patches.

Acked-by: default avatarPunit Agrawal <punit.agrawal@arm.com>
Reviewed-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent c9ebbe6f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment