devm_thermal...ice_register(9)
π devm_thermal_cooling_device_register(9) β like, the whole lore
okay bestie, so this page lives in the Kernel API Manual, and it's literally all about devm_thermal_cooling_device_register β yes that's a mouthful, we're gonna get through it together π«Ά
β¨ NAME β¨
devm_thermal_cooling_device_register β register a thermal cooling device. that's it, that's the vibe check π
πΈ SYNOPSIS πΈ
struct thermal_cooling_device * devm_thermal_cooling_device_register
(struct device *dev , const char *type , void *devdata , const struct
thermal_cooling_device_ops *ops );
no cap, that's the whole signature. four arguments, zero drama (okay maybe a lil drama, keep reading) π¦
π ARGUMENTS π
devβ a validstruct devicepointer of a sensor device. like, it has to be valid fr fr, don't be out here passing garbage πtypeβ the thermal cooling device type. this is the label bestie πdevdataβ device private data. your personal little stash πΈopsβ standard thermal cooling devices callbacks. the actual behavior lives here β
π₯ DESCRIPTION π₯
so this function will register a cooling device. iconic behavior honestly π
this interface function adds a new thermal cooling device (fan/processor/...) to /sys/class/thermal/ folder as cooling_device[0-*]. yes, with a bracket-star and everything, it's giving index energy π
and then β the main character move β it tries to bind itself to all the thermal zone devices registered at the same time. not one, not two, all of them. periodt π
π RETURN π
it returns a pointer to the created struct thermal_cooling_device, or an ERR_PTR.
β οΈ bestie listen to me: caller must check return value with IS_ERR*() helpers. do not skip this. this is the one rule π
π SEE ALSO π
- Kernel file
./drivers/thermal/thermal_core.c bind_previous_governor(9)thermal_set_governor(9)thermal_bind_cdev_to_trip(9)thermal_unbind_cdev_from_trip(9)thermal_cooling_device_register(9)thermal_cooling_device_update(9)thermal_cooling_device_unregister(9)thermal_zone_device_register_with_trips(9)thermal_zone_device_unregister(9)thermal_zone_get_zone_by_name(9)
and that's the page, bestie π§π quick sign-off so you have the receipts: this one's sourced from ./drivers/thermal, dated October 2026, and it's filed under devm_thermal...ice_register(9) β the truncated name is literally how it ships, don't @ me πβ¨
slay, go register some cooling devices responsibly ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms