ENUM VADC_SCALE_FN_TYPE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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.h struct vadc_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