Skip to content

Commit

Permalink
hwmon: (core) New hwmon registration API
Browse files Browse the repository at this point in the history
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: Punit Agrawal <punit.agrawal@arm.com>
Reviewed-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
groeck committed Sep 9, 2016
1 parent c9ebbe6 commit d560168
Show file tree
Hide file tree
Showing 2 changed files with 606 additions and 27 deletions.
Loading

0 comments on commit d560168

Please sign in to comment.