thermal_of_get_trip_type(9)
β¨ thermal_of_get_trip_type(9) β¨
okay so bestie, we're in the Kernel API Manual today and this one is a lil thermal-of helper that literally just reads a trip type for you π it's giving "small function, big feelings", and honestly? iconic.
πΈ NAME πΈ
thermal_of_get_trip_type β get the phy mode for a given device_node π¦
yeah. that's the whole vibe. it fetches the phy mode for the device_node you hand it, no cap.
π SYNOPSIS π
int thermal_of_get_trip_type (struct device_node *np , enum
thermal_trip_type *type );
look at her. int return, two args, one of them a pointer-to-enum situation. main character signature fr fr π
π ARGUMENTS π
npβ pointer to the givendevice_nodeπ± this is the node you're snooping through, bestietypeβ pointer to the resulting trip type π«Ά this is where the answer lands when we're done
π DESCRIPTION π
okay so here's the tea β β the function gets the trip type string from the property 'type', and then it stores its index in the trip_types table in type.
that's it. that's the whole function. she reads a property, she looks up an index, she writes it into your type pointer. lowkey elegant, highkey useful β¨
π₯ RETURN π₯
0on success π- or
errnoin the error case π (so like, check it, bestie, don't just assume it slayed)
π SEE ALSO π
the kernel file lives right here, go read the source iykwyk:
./drivers/thermal/thermal_of.c
and the whole friend group π«Ά:
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)devm_thermal_of_child_cooling_device_register(9)
and that's the page, bestie π this lil gem comes to you from ./drivers/thermal, stamped October 2026, under the Kernel API Manual banner β go forth and read your trip types 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