STRUCT TSENS_OPS(9)
π¦ 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 inmillidegCπ‘οΈ (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
- 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