Message ID | 20181212014927.25840-1-marek.vasut+renesas@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | thermal: Align devm_thermal_zone_{device,of_sensor}_register | expand |
On Wed, Dec 12, 2018 at 02:49:21AM +0100, Marek Vasut wrote: > This patchset attempts to align devm_thermal_zone_{device,of_sensor}_register() > functions and allow passing tz params to devm_thermal_zone_of_sensor_register() > to allow settings no_hwmon params without digging into the tz structures. > > The approach is as follows: > 1) Add {devm_,}thermal_zone_of_sensor_register_params(), which behaves just > like the old variant without _params() suffix, except it takes the struct > thermal_zone_params as an argument. The old _params()-less version of the > function is converted to use the new function and pass params = NULL. > The old _params()-less versions of the functions are retained to avoid > breaking the ABI. > 2) Add the no_hwmon handling into thermal_zone_of_sensor_register_params(), > that's patch 3. > 3) Convert drivers from devm_thermal_zone_of_sensor_register() with structure > diggings to devm_thermal_zone_of_sensor_register_params() without any > extra structure digging, that's the rest of the patches. > > Marek Vasut (6): > thermal: split thermal_zone_of_sensor_register{,_param}() > thermal: split devm_thermal_zone_of_sensor_register{,_param}() > thermal: Register hwmon in thermal_zone_of_sensor_register_param() > thermal: stm32: Convert to > devm_thermal_zone_of_sensor_register_params() > thermal: rcar_thermal: Convert to > devm_thermal_zone_of_sensor_register_params() > thermal: rcar_gen3_thermal: Register hwmon sysfs interface > Fix the errors reported by the bot and also please run checkpatch.pl on your series. > drivers/thermal/of-thermal.c | 104 +++++++++++++++++++++++++--- > drivers/thermal/rcar_gen3_thermal.c | 8 ++- > drivers/thermal/rcar_thermal.c | 33 ++++----- > drivers/thermal/st/stm_thermal.c | 20 ++---- > include/linux/thermal.h | 25 +++++++ > 5 files changed, 144 insertions(+), 46 deletions(-) > > Cc: Daniel Lezcano <daniel.lezcano@linaro.org> > Cc: Eduardo Valentin <edubezval@gmail.com> > Cc: Wolfram Sang <wsa+renesas@sang-engineering.com> > Cc: Zhang Rui <rui.zhang@intel.com> > Cc: linux-renesas-soc@vger.kernel.org > To: linux-pm@vger.kernel.org > > -- > 2.18.0 >
On 12/15/2018 03:02 AM, Eduardo Valentin wrote: > On Wed, Dec 12, 2018 at 02:49:21AM +0100, Marek Vasut wrote: >> This patchset attempts to align devm_thermal_zone_{device,of_sensor}_register() >> functions and allow passing tz params to devm_thermal_zone_of_sensor_register() >> to allow settings no_hwmon params without digging into the tz structures. >> >> The approach is as follows: >> 1) Add {devm_,}thermal_zone_of_sensor_register_params(), which behaves just >> like the old variant without _params() suffix, except it takes the struct >> thermal_zone_params as an argument. The old _params()-less version of the >> function is converted to use the new function and pass params = NULL. >> The old _params()-less versions of the functions are retained to avoid >> breaking the ABI. >> 2) Add the no_hwmon handling into thermal_zone_of_sensor_register_params(), >> that's patch 3. >> 3) Convert drivers from devm_thermal_zone_of_sensor_register() with structure >> diggings to devm_thermal_zone_of_sensor_register_params() without any >> extra structure digging, that's the rest of the patches. >> >> Marek Vasut (6): >> thermal: split thermal_zone_of_sensor_register{,_param}() >> thermal: split devm_thermal_zone_of_sensor_register{,_param}() >> thermal: Register hwmon in thermal_zone_of_sensor_register_param() >> thermal: stm32: Convert to >> devm_thermal_zone_of_sensor_register_params() >> thermal: rcar_thermal: Convert to >> devm_thermal_zone_of_sensor_register_params() >> thermal: rcar_gen3_thermal: Register hwmon sysfs interface >> > > Fix the errors reported by the bot and also please run checkpatch.pl on > your series. Working on it right now. Can you look at the 0001...0003 patches and tell me if this is a valid approach ?
On Sat, Dec 15, 2018 at 03:08:07AM +0100, Marek Vasut wrote: > On 12/15/2018 03:02 AM, Eduardo Valentin wrote: > > On Wed, Dec 12, 2018 at 02:49:21AM +0100, Marek Vasut wrote: > >> This patchset attempts to align devm_thermal_zone_{device,of_sensor}_register() > >> functions and allow passing tz params to devm_thermal_zone_of_sensor_register() > >> to allow settings no_hwmon params without digging into the tz structures. > >> > >> The approach is as follows: > >> 1) Add {devm_,}thermal_zone_of_sensor_register_params(), which behaves just > >> like the old variant without _params() suffix, except it takes the struct > >> thermal_zone_params as an argument. The old _params()-less version of the > >> function is converted to use the new function and pass params = NULL. > >> The old _params()-less versions of the functions are retained to avoid > >> breaking the ABI. > >> 2) Add the no_hwmon handling into thermal_zone_of_sensor_register_params(), > >> that's patch 3. > >> 3) Convert drivers from devm_thermal_zone_of_sensor_register() with structure > >> diggings to devm_thermal_zone_of_sensor_register_params() without any > >> extra structure digging, that's the rest of the patches. > >> > >> Marek Vasut (6): > >> thermal: split thermal_zone_of_sensor_register{,_param}() > >> thermal: split devm_thermal_zone_of_sensor_register{,_param}() > >> thermal: Register hwmon in thermal_zone_of_sensor_register_param() > >> thermal: stm32: Convert to > >> devm_thermal_zone_of_sensor_register_params() > >> thermal: rcar_thermal: Convert to > >> devm_thermal_zone_of_sensor_register_params() > >> thermal: rcar_gen3_thermal: Register hwmon sysfs interface > >> > > > > Fix the errors reported by the bot and also please run checkpatch.pl on > > your series. > > Working on it right now. Can you look at the 0001...0003 patches and > tell me if this is a valid approach ? Yes, the approach seams fine to me, > > -- > Best regards, > Marek Vasut