devm_therma...ice_register(9)
π devm_thermal_of_child_cooling_device_register(9) π
okay bestie, so this is a page from the Kernel API Manual, section 9 β and it's literally the glow-up guide for registering an OF thermal cooling device. no cap. let's get into it π«Ά
β¨ NAME β¨
devm_thermal_of_child_cooling_device_register β register an OF thermal cooling device. that's it, that's the whole vibe. π
πΈ SYNOPSIS πΈ
struct thermal_cooling_device *
devm_thermal_of_child_cooling_device_register (struct device *dev ,
struct device_node *np , const char *type , void *devdata , const struct
thermal_cooling_device_ops *ops );
like, five arguments, one iconic function. she's a little wordy but she serves π
π¦ ARGUMENTS π¦
devβ a validstruct devicepointer of a sensor device. homegirl has to be legit, okay? don't be passing her nonsense.npβ a pointer to a device tree node. yes, that kind of node. π³typeβ the thermal cooling device type. it's giving "what kind of cooler are we today" energy.devdataβ device private data. her own lil personal stash, iykyk πopsβ standard thermal cooling devices callbacks. the whole personality of the device lives here, fr fr.
π₯ DESCRIPTION π₯
okay so. this function will register a cooling device with a device tree node reference. main character behavior honestly π
this interface function adds a new thermal cooling device (fan/processor/...) to the /sys/class/thermal/ folder as cooling_device[0-*]. and the way that she tries to bind herself to all the thermal zone devices registered at the same time?? obsessed. multi-tasking queen. β¨
this function should be used when a cooling controller has child nodes which are referenced in the thermal zone cooling map. like, that's the whole situation she's built for. if that's your setup, she's your girl. π«Ά
π RETURN π
a pointer to the created struct thermal_cooling_device or an ERR_PTR. so basically she comes back with either a beautiful new device or a dramatic error wrapped up all cute. π
β οΈ caller must check the return value with IS_ERR*() helpers. do NOT skip the vibe check. if you skip it, that's on you bestie, and the kernel will humble you. π
π SEE ALSO π
kernel file ./drivers/thermal/thermal_of.c plus her whole friend group:
thermal_of_get_trip_type(9)thermal_of_zone_unregister(9)thermal_of_zone_register(9)devm_thermal_of_zone_register(9)devm_thermal_of_zone_unregister(9)thermal_of_cooling_device_register(9)devm_thermal_of_cooling_device_register(9)
go read the whole squad, no excuses πβ¨
and that's the tea π β brought to you by ./drivers/thermal, dated October 2026, page devm_therma...ice_register(9). mwah, love u, read ur manpages πππ¦
π¦ 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