tsens_read_temp(9)
π 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 theregmap_fieldarray 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 πΈ
0on 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:
struct tsens_irq_data(9)tsens_hw_to_mC(9)tsens_mC_to_hw(9)tsens_set_interrupt(9)tsens_threshold_violated(9)tsens_critical_irq_thread(9)tsens_irq_thread(9)tsens_combined_irq_thread(9)
π«Ά mwah π this page lives in ./drivers/thermal/qcom, dated October 2026 β periodt. π
π¦ 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