STRUCT STM32_ADC_PRIV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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