thermal_of_get_trip_type(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 given device_node 🌱 this is the node you're snooping through, bestie
  • type β€” 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 πŸ”₯

  • 0 on success πŸŽ‰
  • or errno in 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 🫢:


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