ENUM VADC_SCALE_FN_TYPE(9)
π
enum vadc_scale_fn_type(9) β the Kernel API Manual glow-up β¨
okay so bestie, welcome to the Kernel API Manual page for enum vadc_scale_fn_type, and ngl this one is a whole mood: it's basically the little menu of scaling functions that take your raw ADC code and turn it into actual physical scaled units for the channel. like, raw numbers in, real-world meaning out. iconic conversion behavior fr fr π¦
β¨ NAME β¨
enum vadc_scale_fn_type β Scaling function to convert ADC code to physical scaled units for the channel.
like yes, that's literally the job description and it ate π
πΈ SYNOPSIS πΈ
enum vadc_scale_fn_type {
SCALE_DEFAULT ,
SCALE_THERM_100K_PULLUP ,
SCALE_PMIC_THERM ,
SCALE_XOTHERM ,
SCALE_PMI_CHG_TEMP ,
SCALE_HW_CALIB_DEFAULT ,
SCALE_HW_CALIB_THERM_100K_PULLUP ,
SCALE_HW_CALIB_XOTHERM ,
SCALE_HW_CALIB_THERM_100K_PU_PM7 ,
SCALE_HW_CALIB_PMIC_THERM ,
SCALE_HW_CALIB_PMIC_THERM_PM7 ,
SCALE_HW_CALIB_PM5_CHG_TEMP ,
SCALE_HW_CALIB_PM5_SMB_TEMP
};
π Constants π
okay so here's the whole cast, main-character style π
SCALE_DEFAULTβ Default scaling to convert raw adc code to voltage (uV). the og, the blueprint, the "just give me microvolts" option π«ΆSCALE_THERM_100K_PULLUPβ Returns temperature in millidegC. Uses a mapping table with 100K pullup. lookup table core, 100K pullup slay πSCALE_PMIC_THERMβ Returns result in milli degree's Centigrade. (yes, that apostrophe is canon, i don't make the rules π)SCALE_XOTHERMβ Returns XO thermistor voltage in millidegC. getting that XO thermistor reading, cute πΈSCALE_PMI_CHG_TEMPβ Conversion for PMI CHG temp. that's it, that's the whole vibe π₯SCALE_HW_CALIB_DEFAULTβ Default scaling to convert raw adc code to voltage (uV) with hardware applied offset/slope values to adc code. same energy as the default but the hardware does the offset/slope glow-up β¨SCALE_HW_CALIB_THERM_100K_PULLUPβ Returns temperature in millidegC using lookup table. The hardware applies offset/slope to adc code. lookup table + hardware offset/slope, bestie, a collab π«SCALE_HW_CALIB_XOTHERMβ Returns XO thermistor voltage in millidegC using 100k pullup. The hardware applies offset/slope to adc code. XO thermistor with the 100k pullup, and yes, hardware offset/slope on top π¦SCALE_HW_CALIB_THERM_100K_PU_PM7β Returns temperature in millidegC using lookup table for PMIC7. The hardware applies offset/slope to adc code. PMIC7 edition, the way that lookup table is doing the most πSCALE_HW_CALIB_PMIC_THERMβ Returns result in milli degree's Centigrade. The hardware applies offset/slope to adc code. This is for PMIC7. milli degrees Centigrade, and mind the PMIC7 note πSCALE_HW_CALIB_PMIC_THERM_PM7β-- undescribed --. no cap, the manpage literally just says it's undescribed. the mystery. the intrigue. we simply do not know πSCALE_HW_CALIB_PM5_CHG_TEMPβ Returns result in millidegrees for PMIC5 charger temperature. PMIC5 charger temp reporting, millidegrees, periodt βSCALE_HW_CALIB_PM5_SMB_TEMPβ Returns result in millidegrees for PMIC5 SMB1390 temperature. PMIC5 SMB1390 temp, millidegrees, and that's the whole note π
ngl the one thing to remember: every constant here is copied exact, casing and all, so don't go "fixing" the underscores or the apostrophes bestie, they're part of the lore π
π SEE ALSO π
- Kernel file
./include/linux/iio/adc/qcom-vadc-common.hstructvadc_linear_graph(9)
go read that struct next, that's your next hyperfixation, iykyk π
and that's the page!! mwah π from the Kernel API Manual, brought to you by the good people at ./include/linux/iio/adc, dated October 2026 β bookmark it, screenshot it, send it to the group chat, you're welcome bestie ππ«Άβ¨
π¦ 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