acpi_lpat_raw_to_temp(9)
β¨ acpi_lpat_raw_to_temp β¨
okay bestie, welcome to the Kernel API Manual π
this one's a lil function called acpi_lpat_raw_to_temp(9) and honestly? she's a glow-up specialist β she takes your crusty raw number and turns it into an actual temperature. no cap. π¦
πΈ NAME πΈ
acpi_lpat_raw_to_temp β returns you a temperature from a raw value, going through the LPAT conversion table π literally the whole personality of this function.
π SYNOPSIS π
int acpi_lpat_raw_to_temp (struct acpi_lpat_conversion_table *lpat_table
, int raw );
like, that's the whole signature. she's not complicated, she's just iconic β¨
π«Ά ARGUMENTS π«Ά
lpat_tableβ thetemperature_rawmapping table structure, i.e. the ~vibes translation dictionary~ you're passing in. it's the structure that maps temperature β raw, and she needs it. πrawβ the raw value, and it's used as a key to get the temperature out of that mapping table above. so like, you give her the key, she hands you the temp. iykyk π
π DESCRIPTION π
okay so here's the tea β β on success you get a positive converted temperature value back. slay. that's the good ending.
but if things go sideways? you get a negative errno returned in the error cases. so like, don't just blindly trust the number, do a vibe check first π if it's negative, that's not a temperature, that's a complaint.
fr fr, the sign is doing a LOT of work here β positive = actual temp, negative = errno. don't get it twisted π
π§ SEE ALSO π§
- Kernel file
./drivers/acpi/acpi_lpat.cβ the source, go read her β¨ acpi_lpat_temp_to_raw(9)β the reverse girly πacpi_lpat_get_conversion_table(9)β how you get the table in the first place πacpi_lpat_free_conversion_table(9)β and how you clean up after yourself, be responsible bestie π«Ά
and that's the whole page!! mwah π this lovely lil doc lives over in ./drivers/acpi and it's dated October 2026 β so yeah, she's from the future, obviously. πβπ
π¦ 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