tsens_hw_to_mC(9)
π tsens_hw_to_mC(9) π
okay so bestie, welcome to the Kernel API Manual entry for tsens_hw_to_mC(9) β yes that (9) means it's a kernel function, we're in the big leagues now β¨
π NAME π
tsens_hw_to_mC β returns you a sign-extended temperature in mCelsius π (milliCelsius, bestie, we're talking tiny tiny degrees)
β¨ SYNOPSIS β¨
int tsens_hw_to_mC (const struct tsens_sensor *s , int temp );
π¦ ARGUMENTS π¦
sβ pointer to the sensor struct π«Ά like, the whole personality of the sensor lives in heretempβ the temperature in milliCelsius that's gonna be read from hardware π₯
πΈ DESCRIPTION πΈ
okay so here's the tea: this function handles the temperature that comes back from the hardware, and depending on the IP version it's giving ADC code or deciCelsius π like it literally adapts, main character energy fr fr
no cap, that's the whole vibe β it deals with whichever format your IP version throws at it π
π RETURN π
on success you get the temperature in milliCelsius back, slay β¨ and in error cases a negative errno gets returned β so if you see a negative number, that's not a cold temperature bestie, that's an error π
π SEE ALSO π
- Kernel file
./drivers/thermal/qcom/tsens.c struct tsens_irq_data(9)tsens_read_temp(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)
like, go read the whole friend group, they're all iconic π§
π friendly reminder: every single one of those SEE ALSO references is a real function or struct β don't skip them, iykyk
and that's a wrap, bestie π this page lives in ./drivers/thermal/qcom, dated October 2026, and it's filed under tsens_hw_to_mC(9) β go forth and convert those temperatures, you're gonna ate πβπ
π¦ 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