STRUCT TSENS_LEGACY_CALIBRATION_FORMAT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct tsens_legacy_calibration_format(9) πŸ’–

okay bestie, welcome to the kernel API manual for struct tsens_legacy_calibration_format(9) β€” yes that's the whole title, we're being thorough today ✨


🌸 NAME 🌸

struct tsens_legacy_calibration_format β€” it's literally the description of the calibration data you use when you're parsing the legacy nvmem blob 🫢 like, it tells you how the old-school calibration bytes are laid out so you don't have to guess. no cap, that's the entire job.


✨ SYNOPSIS ✨

here's the shape of it, copy it exactly okay:

struct tsens_legacy_calibration_format {
    unsigned int base_len;
    unsigned int base_shift;
    unsigned int sp_len;
    struct tsens_single_value mode;
    struct tsens_single_value invalid;
    struct tsens_single_value base[2];
    struct tsens_single_value sp[][2];
 };

look at that little beauty πŸ’… honestly iconic.


πŸŽ€ Members πŸŽ€

time for the member-by-member vibe check, one at a time, no skipping πŸ™ˆ

  • base_len β€” the length of the base fields inside calibration data. it's giving "how many bits am i working with" energy ✨
  • base_shift β€” the shift to be applied to base data. gotta slide those bits over, periodt πŸ’«
  • sp_len β€” the length of the sN_pM fields inside calibration data. same deal as base_len, but for the sN_pM girlies 🌸
  • mode β€” descriptor of the calibration mode field πŸ‘‘
  • invalid β€” descriptor of the calibration mode invalid field πŸ’€ (yes, there's a whole field for "this mode is invalid", she's valid tho)
  • base β€” descriptors of the base0 and base1 fields. that's the [2] right there, two of them, a matching set πŸŽ€
  • sp β€” descriptors of the sN_pM fields. note the [][2] β€” it's a flex-y array, she grows 😌

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, bestie, they're all in the Kernel file ./drivers/thermal/qcom/tsens.h:

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

iykyk πŸ”₯


fr fr, everything above lives under ./drivers/thermal/qcom β€” that's the source, mwah πŸ’‹

and that's the whole page! dated October 2026, filed under ./drivers/thermal/qcom, and yes this is struct tsens_legacy_calibration_format(9) signing off 🌈 stay calibrated, bestie πŸ’œπŸ§šβ­

πŸ“¦ where this page comes from