STRUCT TSENS_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct tsens_ops(9) πŸ¦‹

okay so this is a page from the Kernel API Manual, and honestly? it's giving backstage-pass energy. this struct is literally the operations table β€” the whole vibe of what a tsens device can actually do. every function pointer in here is a lil job description, and the tsens driver just picks whoever's got the right skill set πŸ’…


✨ NAME ✨

struct tsens_ops β€” the operations that the tsens device supports, periodt πŸ”₯


πŸŽ€ SYNOPSIS πŸŽ€

struct tsens_ops {
    int (*init)(struct tsens_priv *priv);
    int (*calibrate)(struct tsens_priv *priv);
    int (*get_temp)(const struct tsens_sensor *s, int *temp);
    int (*enable)(struct tsens_priv *priv, int i);
    void (*disable)(struct tsens_priv *priv);
    int (*suspend)(struct tsens_priv *priv);
    int (*resume)(struct tsens_priv *priv);
 };

like, that's the whole lineup bestie β€” seven function pointers, all main character energy πŸ‘‘


πŸ’– MEMBERS πŸ’–

each one of these is a function pointer, and yes we're going through all of them, no skipping πŸ™ˆ

  • init β€” the function that initializes the tsens device 🌱
  • calibrate β€” the function that calibrates the tsens device 🎯
  • get_temp β€” the function that returns the temp in millidegC 🌑️ (yes, milli β€” she's precise)
  • enable β€” the function that enables (clocks/power) the tsens device ⚑
  • disable β€” the function that disables the tsens device πŸ’€
  • suspend β€” the function that suspends the tsens device 😴
  • resume β€” the function that resumes the tsens device πŸŒ…
ngl the symmetry here? immaculate. enable/disable, suspend/resume, like a little matching set 🫢

πŸ” SEE ALSO πŸ”

go look at the kernel file ./drivers/thermal/qcom/tsens.h first, then these icons:

  • struct tsens_sensor(9)
  • struct tsens_features(9)
  • struct tsens_plat_data(9)
  • struct tsens_context(9)
  • struct tsens_priv(9)
  • struct tsens_single_value(9)
  • struct tsens_legacy_calibration_format(9)

okay that's the whole page, you ate that πŸ’… this masterpiece lives over in ./drivers/thermal/qcom, and it was dated October 2026 β€” so yeah, mark your calendar bestie, see you then β­πŸŒˆπŸ’œ

πŸ“¦ where this page comes from