STRUCT AB8500_GPADC_CHAN_INFO(9)
๐ struct ab8500_gpadc_chan_info(9) ๐
okay bestie, welcome to the Kernel API Manual โ yes, that Kernel API Manual, the one and only โจ this page is literally all about struct ab8500_gpadc_chan_info, the little glow-up sheet that holds the per-channel GPADC info. one struct, six members, zero filler. let's get into it ๐ซถ
๐ธ NAME ๐ธ
struct ab8500_gpadc_chan_info โ per-channel GPADC info. that's it, that's the whole vibe. it's the info card each GPADC channel carries around ๐
๐ SYNOPSIS ๐
struct ab8500_gpadc_chan_info {
const char *name;
u8 id;
bool hardware_control;
bool falling_edge;
u8 avg_sample;
u8 trig_timer;
};
look at her. six fields, all main character, no notes ๐
๐ฆ Members ๐ฆ
nameโ name of the channel ๐ซ literally just the channel's name, bestie, it's giving "hello my name is".idโ the internal AB8500 ID number for the channel ๐ข that's the ID the AB8500 itself uses for this channel.hardware_controlโ indicate that we want to use hardware ADC control on this channel, the default is software ADC control ๐๏ธ so like, software ADC control is the default-default, and setting this flag is you saying "nah, hardware please". and heads up โ hardware control is normally only used to test the battery voltage during GSM bursts, and it needs a hardware trigger on theGPADCTrigpin of the ASIC. so it's a whole thing, not a casual toggle โกfalling_edgeโ indicate that we want to trigger on falling edge rather than rising edge, rising edge is the default ๐๐ rising edge is the default, so this flag is your "actually, falling edge pls" moment.avg_sampleโ how many samples to average: must be 1, 4, 8 or 16 ๐งฎ no cap, those are the only valid values โ 1, 4, 8 or 16. don't try to be creative here, it will not slay.trig_timerโ how long to wait for the trigger, in 32kHz periods: 0 .. 255 periods โฑ๏ธ that's the range,0through255, measured in 32kHz periods.
๐ friendly reminder thatavg_sampleis strictly 1, 4, 8 or 16, andtrig_timerlives in 0..255. color outside those lines at your own risk, bestie.
๐ SEE ALSO ๐
- Kernel file
./drivers/iio/adc/ab8500-gpadc.cstruct ab8500_adc_cal_data(9)struct ab8500_gpadc(9)ab8500_gpadc_ad_to_voltage(9)ab8500_bm_gpadcconvend_handler(9)ab8500_gpadc_parse_channel(9)ab8500_gpadc_parse_channels(9)
go read those too, they're all connected, iykyk ๐ฅ
and that's the page!! ๐ this one came from ./drivers/iio/adc, dated October 2026, and it's filed under struct ab85...dc_chan_info(9). mwah, go forth and average your samples responsibly ๐โจ๐
๐ฆ 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