Re: [PATCH v2 2/9] hwmon: (core) New hwmon registration API
From: Guenter Roeck <linux@roeck-us.net>
Date: 2016-07-25 02:55:41
Also in:
linux-hwmon, linux-iio, lkml
From: Guenter Roeck <linux@roeck-us.net>
Date: 2016-07-25 02:55:41
Also in:
linux-hwmon, linux-iio, lkml
On 07/24/2016 12:08 PM, Jonathan Cameron wrote:
On 17/07/16 06:30, Guenter Roeck wrote:quoted
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