thermal_fwno...ice_register(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… thermal_fwnode_cooling_device_register(9)

okay bestie, so this is a page straight out of the Kernel API Manual β€” the function name gets truncated in the header to thermal_fwno...ice_register(9) but the real full name is right below, promise 🫢


✨ NAME ✨

thermal_fwnode_cooling_device_register β€” register an thermal cooling device πŸŒ‘οΈπŸ’–

(yes, "an thermal", the kernel said what it said, we're not fixing it 😌)


πŸ¦‹ SYNOPSIS πŸ¦‹

struct thermal_cooling_device * thermal_fwnode_cooling_device_register
(struct fwnode_handle *fwnode , int fwn_index , const char *type , void
*devdata , const struct thermal_cooling_device_ops *ops );

πŸŽ€ ARGUMENTS πŸŽ€

  • fwnode β€” -- undescribed -- πŸ™ˆ that's literally all the docs give us, no cap. We move.
  • fwn_index β€” -- undescribed -- 😭 same energy, also undescribed. Iconic of the docs, honestly.
  • type β€” the thermal cooling device type.
  • devdata β€” device private data.
  • ops β€” standard thermal cooling devices callbacks.

πŸ’… DESCRIPTION πŸ’…

So this function registers a cooling device with a device tree node reference. ✨

What that actually means in group-chat terms: this interface function adds a brand new thermal cooling device (a fan, a processor, ...) into the /sys/class/thermal/ folder as cooling_device[0-*]. πŸ“πŸ”₯

And then β€” the main character move β€” it tries to bind itself to all the thermal zone devices registered at the same time. It's giving networking at the function level, fr fr. 🫢


🌈 RETURN 🌈

It hands you back a pointer to the created struct thermal_cooling_device β€” or an ERR_PTR. πŸ’€

⚠️ Caller must check the return value with the IS_ERR*() helpers. Like, actually check it. Do not skip the vibe check on your pointers bestie, that's how you get a crash 🧚

πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page, you ate that πŸ“

⭐ source path ./drivers/thermal, dated October 2026, filed under thermal_fwno...ice_register(9) β€” periodt, see ya πŸ’œ

πŸ“¦ where this page comes from