thermal_coo...ice_register(9)
π thermal_coo...ice_register(9) β or, like, the Kernel API Manual entry you didn't know you needed π
okay so bestie, welcome to the thermal_cooling_device_register(9) page from the Kernel API Manual. yes the title is literally abbreviated with ... in the middle, that's just how the header rolls, do not come for her π. let's get into it β¨
β¨ NAME β¨
thermal_cooling_device_register β register a new thermal cooling device π§
like, you're introducing a brand new cooling device to the kernel. it's giving debutante ball. it's giving main character energy. πΈ
β¨ SYNOPSIS β¨
struct thermal_cooling_device * thermal_cooling_device_register (const
char *type , void *devdata , const struct thermal_cooling_device_ops
*ops );
no cap, that's the whole signature. struct pointer out front, three args in the back. iconique. π
β¨ ARGUMENTS β¨
typeβ the thermal cooling device type. literally just the type, bestie, that's the whole vibe check on this one π¦devdataβ device private data. your personal little stash of stuff, kept private, as the name fr fr says πopsβ standard thermal cooling devices callbacks. the standard callbacks, the classics, the moment π
β¨ DESCRIPTION β¨
so this interface function adds a new thermal cooling device (fan/processor/...) to the /sys/class/thermal/ folder as cooling_device[0-*]. yes, that's a glob. yes, the kernel is out here just numbering them. slay π
and then β this is the part β it tries to bind itself to all the thermal zone devices registered at the same time. all of them. not one, not a couple, ALL. highkey ambitious of her honestly π₯
ngl "tries" is doing a lot of work in that sentence, so don't come crying to me if the binding is giving aspirational rather than guaranteed π
β¨ RETURN β¨
you get back a pointer to the created struct thermal_cooling_device or an ERR_PTR. π«Ά
and listen to me very carefully: the caller must check the return value with the IS_ERR*() helpers. must. not should, not maybe, MUST. this is not a drill, this is the whole safety briefing π
literally do not skip the IS_ERR*() check. that's the one thing this page is yelling at you about. π
β¨ SEE ALSO β¨
kernel file ./drivers/thermal/thermal_core.c plus the whole friend group π:
bind_previous_governor(9)thermal_set_governor(9)thermal_bind_cdev_to_trip(9)thermal_unbind_cdev_from_trip(9)devm_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)
that's ten whole functions of further reading, bestie. iykyk πβ¨
kisses and thermal zones π¦π β this page lives in ./drivers/thermal, dated October 2026, and yes she signs off the same way every time, consistency is a flex periodt π
π¦ 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