Skip to content

thermal: Introduce devm_thermal_of_cooling_device_register

Guenter Roeck linux-arm-kernel linux-aspeed linux-hwmon linux-pm lkml openbmc 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6thermal: Introduce devm_thermal_of_cooling_device_registerdrivers/thermal/thermal_core.c include/linux/thermal.h+54 -04 replies
2/6hwmon: (aspeed-pwm-tacho) Use devm_thermal_of_cooling_device_registerdrivers/hwmon/aspeed-pwm-tacho.c+2 -41 reply
3/6hwmon: (gpio-fan) Use devm_thermal_of_cooling_device_registerdrivers/hwmon/gpio-fan.c+9 -160 replies
4/6hwmon: (mlxreg-fan) Use devm_thermal_of_cooling_device_registerdrivers/hwmon/mlxreg-fan.c+10 -210 replies
5/6hwmon: (npcm750-pwm-fan) Use devm_thermal_of_cooling_device_registerdrivers/hwmon/npcm750-pwm-fan.c+2 -40 replies
6/6hwmon: (pwm-fan) Use devm_thermal_of_cooling_device_registerdrivers/hwmon/pwm-fan.c+29 -441 reply

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchPatrick Venture
1/6
2/6R-b
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] thermal: Introduce devm_thermal_of_cooling_device_register

thermal_of_cooling_device_register() and thermal_cooling_device_register() are typically called from driver probe functions, and thermal_cooling_device_unregister() is called from remove functions. This makes both a perfect candidate for device managed functions.

Introduce devm_thermal_of_cooling_device_register(). This function can also be used to replace thermal_cooling_device_register() by passing a NULL pointer as device node. The new function requires both struct device * and struct device_node * as parameters since the struct device_node * parameter is not always identical to dev->of_node.

Don't introduce a device managed remove function since it is not needed at this point.

The patch series introduces the new function and then converts various hwmon drivers to use it.