tsens_read_temp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

tsens_read_temp β€” grab temperature readings straight out of the hardware, bestie. This one's from the Kernel API Manual, and it's giving β€œthermal sensor core energy” fr fr.


✨ SYNOPSIS ✨

int tsens_read_temp (const struct tsens_sensor *s , int field , int
       *temp );

πŸŽ€ ARGUMENTS πŸŽ€

  • s β€” pointer to the sensor struct. Literally the sensor bestie we're reading from.
  • field β€” index into the regmap_field array that points to the temperature data. iykyk.
  • temp β€” temperature in deciCelsius, to be read from the hardware. Yes, deciCelsius, not Celsius β€” she's got her own units πŸ’….

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this function handles the temperature that comes back either in ADC code or in deciCelsius, depending on the IP version. That's the whole vibe: it deals with whichever format the hardware hands over. No cap.


🌸 RETURN 🌸

  • 0 on success β€” slay.
  • A negative errno gets returned in error cases β€” not the moment, but it happens 😭.

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/thermal/qcom/tsens.c plus these iconic friends:


🫢 mwah πŸ’‹ this page lives in ./drivers/thermal/qcom, dated October 2026 β€” periodt. 🌈

πŸ“¦ where this page comes from