ab8500_gpadc_ad_to_voltage(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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