ab8500_gpadc_ad_to_voltage(9)
π ab8500_gpadc_ad_to_voltage π
okay so this is a page straight out of the Kernel API Manual, bestie, and it's about one (1) function that takes your raw ADC number and turns it into an actual voltage. glow-up for integers, fr.
β¨ NAME β¨
ab8500_gpadc_ad_to_voltage β Convert a raw ADC value to a voltage
like, that's the whole gig. raw number in, voltage out. slay.
π¦ SYNOPSIS π¦
int ab8500_gpadc_ad_to_voltage (struct ab8500_gpadc *gpadc , enum
ab8500_gpadc_channel ch , int ad_value );
it returns an int, she takes three args, and yes the spacing is exactly like that, don't @ me, that's literally how it's written π
π ARGUMENTS π
gpadcβ the GPADC instance π like, the actual little guy you're talking to.chβ the sampled channel this raw value is coming from πΈ important, because the raw number only means something if you know which channel it came from, iykyk.ad_valueβ the raw value π«Ά that's it. that's the number. the raw one. the before picture.
π SEE ALSO π
Kernel file ./drivers/iio/adc/ab8500-gpadc.c, plus the whole friend group:
struct ab8500_adc_cal_data(9)struct ab8500_gpadc_chan_info(9)struct ab8500_gpadc(9)ab8500_bm_gpadcconvend_handler(9)ab8500_gpadc_parse_channel(9)ab8500_gpadc_parse_channels(9)
ngl that's a stacked lineup. go read them, they're iconic π
aaaand that's the page!! this one lives in ./drivers/iio/adc, dated October 2026, and honestly? main character energy for a directory. periodt. π§ββοΈβ
π¦ 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