ms_sensors_tp_read_prom(9)
π
ms_sensors_tp_read_prom β from the Kernel API Manual (yes, the whole manual, we're fancy) π
okay bestie, sit down, hydrate, and let me tell you about a little function that's out here doing the most important job in the temperature/pressure world: reading the prom coefficients and checking the CRC. she's not flashy, but she's iconic.
β¨ NAME β¨
ms_sensors_tp_read_prom β the prom coeff read function. that's it, that's the whole vibe. it reads prom coefficients. slay.
π¦ SYNOPSIS π¦
int ms_sensors_tp_read_prom(struct ms_tp_dev *dev_data);
one function, one argument, zero drama. love that for us.
πΈ ARGUMENTS πΈ
dev_dataβ a pointer to your temperature/pressure device data. this is the main character of the whole operation, so likeβ¦ make sure it's actually pointing at something real, mkay? π«Ά
π DESCRIPTION π
so what does she actually do? two things, and she does them well:
- reads the prom coefficients π
- checks the CRC β
and that's the tea. this function is built for the MS5637 and MS8607 chipsets β if you're running either of those, she's literally your girl. no cap. π₯
π RETURN π
0β success, everything's giving flawless, we're so back π- negative
errnoβ something went sideways, and the negative errno is there to tell you exactly what π
π SEE ALSO π
the whole friend group, in kernel file ./drivers/iio/common/ms_sensors/ms_sensors_i2c.c:
ms_sensors_reset(9)ms_sensors_read_prom_word(9)ms_sensors_convert_and_read(9)ms_sensors_crc_valid(9)ms_sensors_read_serial(9)ms_sensors_write_resolution(9)ms_sensors_show_battery_low(9)ms_sensors_show_heater(9)ms_sensors_write_heater(9)ms_sensors_ht_read_temperature(9)ms_sensors_ht_read_humidity(9)ms_sensors_tp_crc4(9)ms_sensors_tp_crc_valid_112(9)ms_sensors_tp_crc_valid_128(9)ms_sensors_read_temp_and_pressure(9)
go read all fifteen of them, bestie, i'll wait. iykyk. π§
π reminder: the dev_data pointer is the whole ballgame β it's your temperature/pressure device data and nothing else. no guessing, no vibes-based casting.
that's the whole page!! mwah!! ππ
source/version: ./drivers/iio/common/ms_sensors β dated October 2026. it's giving timeless, it's giving archival, it's giving "bookmark this for later" πβ¨ bye bestie, go read some prom coefficients π
π
π¦ 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