STRUCT STM32_ADC_PRIV(9)
π struct stm32_adc_priv(9) β like, the whole Kernel API Manual page, bestie
okay so picture this: you're deep in the kernel source, right, and you bump into struct stm32_adc_priv β the private data that holds the entire stm32 ADC core together. this page is straight out of the Kernel API Manual and it's literally the blueprint for that struct. no cap, every field matters. let's get into it π«Ά
β¨ NAME β¨
struct stm32_adc_priv β the stm32 ADC core private data. it's giving backstage-pass energy: all the clocks, regulators, irqs and config that the ADC core keeps to itself π
πΈ SYNOPSIS πΈ
lowkey just look at it, it's gorgeous:
struct stm32_adc_priv {
int irq[STM32_ADC_MAX_ADCS];
unsigned int nb_adc_max;
struct irq_domain *domain;
struct clk *aclk;
struct clk *bclk;
u32 max_clk_rate;
struct regulator *booster;
struct regulator *vdd;
struct regulator *vdda;
struct regulator *vref;
int vdd_uv;
int vdda_uv;
const struct stm32_adc_priv_cfg *cfg;
struct stm32_adc_common common;
u32 ccr_bak;
struct regmap *syscfg;
};
like, the alignment?? the vibes?? iconic. do not touch a single character of it, bestie, it's verbatim for a reason π
π¦ Members π¦
okay this is the part where we go field by field, main-character style:
irqβ irq(s) for ADC block. yes, plural, it's an array, she's flexible πnb_adc_maxβ the actual maximum number of instance per ADC block. the real number. not the fake one.domainβ irq domain reference. she knows where all the interrupts live πaclkβ clock reference for the analog circuitry. analog girlies stay clocked β°bclkβ bus clock common for all ADCs, and it depends on the part used. so like, check your part, iykyk.max_clk_rateβ the desired maximum clock rate. desire is the key word here, it's a wish not a promise β¨boosterβ booster supply reference. boost boost πvddβ vdd supply reference.vddaβ vdda analog supply reference. extra "a" for extra analog, she's fancy.vrefβ regulator reference. the reference reference, we love recursion πvdd_uvβ vdd supply voltage, measured in microvolts (microvolts!! tiny!!) πvdda_uvβ vdda supply voltage, also in microvolts.cfgβ compatible configuration data. matching outfits with the device tree, we love to see it πcommonβ common data shared by all ADC instances. sharing is caring, bestie π«Άccr_bakβ backup CCR in low power mode. she naps but she remembers π€syscfgβ reference to syscon, system control registers. the system control registers themselves, no middleman π₯
π SEE ALSO π
go read these next, they're the friend group:
- Kernel file
./drivers/iio/adc/stm32-adc-core.c struct stm32_adc_common_regs(9)struct stm32_adc_priv_cfg(9)stm32f4_adc_clk_sel(9)struct stm32h7_adc_ck_spec(9)
okay that's the whole page, you ate that π
and for the credits: this lives under ./drivers/iio/adc, it's the October 2026 era, and the page name is struct stm32_adc_priv(9). mwah, go forth and probe those ADCs π§ββοΈβπ
π¦ 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