On 07/24/2016 12:08 PM, Jonathan Cameron wrote:
On 17/07/16 06:30, Guenter Roeck wrote:
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.
Looks good to me which is pretty unusual for a V2 of anything ;)
Thanks ... unfortunately, it wasn't perfect, so I'll have to send another version.
The thermal code needs to be surrounded with "#if IS_REACHABLE(CONFIG_THERMAL)
&& defined(CONFIG_THERMAL_OF)".
Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html