STRUCT TEMP_SENSOR_REGVAL(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐ŸŒก๏ธ struct temp_sensor_regval(9) โ€” the kernel API manual, bestie edition

okay so you're in the kernel API manual and the star of the show is struct temp_sensor_regval โ€” literally the temperature sensor's register values plus its private data, all bundled up together ๐Ÿ’… this is <hotpink>struct temp_sensor_regval</hotpink>(9), hi bestie ๐Ÿซถ


โœจ NAME โœจ

struct temp_sensor_regval โ€” temperature sensor register values and priv data ๐ŸŒก๏ธ๐Ÿ’–


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

struct temp_sensor_regval {
    u32 bg_mode_ctrl;
    u32 bg_ctrl;
    u32 bg_counter;
    u32 bg_threshold;
    u32 tshut_threshold;
    void *data;
 };

that's the whole vibe right there, no cap ๐Ÿ”ฅ


๐ŸŽ€ Members ๐ŸŽ€

  • bg_mode_ctrl โ€” the temp sensor control register value, she's the boss of mode ๐ŸŽ›๏ธ
  • bg_ctrl โ€” the bandgap ctrl register value ๐Ÿ’ซ
  • bg_counter โ€” bandgap counter value, she counts ๐Ÿงฎ
  • bg_threshold โ€” bandgap threshold register value โš–๏ธ
  • tshut_threshold โ€” bandgap tshut register value, very important for the shutdown situation ๐Ÿšจ
  • data โ€” private data ๐Ÿ™ˆ like, mind your business, it's hers

๐Ÿ’œ Description ๐Ÿ’œ

so this is the data structure whose whole job is to save and restore the bandgap register set context โœจ that's it, that's the assignment ๐ŸŽ€ and listen โ€” only the required registers get shadowed, when needed. not me being minimal about it, that's the actual design ๐Ÿ’… lowkey iconic.


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

  • Kernel file ./drivers/thermal/ti-soc-thermal/ti-bandgap.h bandgap driver data structure(9)
  • struct temp_sensor_registers(9)
  • struct temp_sensor_data(9)
  • struct ti_bandgap(9)
  • struct ti_temp_sensor(9)
  • ti bandgap feature types(9)
  • struct ti_bandgap_data(9)

go read those next, iykyk ๐Ÿ“š๐Ÿฆ‹


fr fr the whole bandgap squad is in ./drivers/thermal/ti-soc-thermal โ€” that's the group chat ๐Ÿซถ

aaaand that's a wrap bestie ๐ŸŒธ this gem is from October 2026, source <yellow>./drivers/thermal/ti-soc-thermal</yellow>, filed under struct temp_sensor_regval(9) โ€” slay, go restore some context ๐Ÿ’…โœจ๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from