stm32h7_adc_prepare(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… stm32h7_adc_prepare(9) β€” the Kernel API Manual, but make it make sense

okay bestie, welcome to the Kernel API Manual page for stm32h7_adc_prepare, and yes this is the whole vibe. one function, one job, and it's lowkey important πŸŽ€


✨ NAME ✨

stm32h7_adc_prepare β€” leave power down mode to enable ADC.

that's it. that's the whole assignment. we are waking the ADC up 🫢


🌸 SYNOPSIS 🌸

int stm32h7_adc_prepare (struct iio_dev *indio_dev );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • indio_dev β€” the IIO device instance. this is the main character of the call ngl πŸ‘‘

so here's what "leave power down mode" actually involves, step by step, because the manpage is fr fr listing them all out:

  • Leave power down mode.
  • Configure channels as single ended or differential before enabling the ADC. order matters, bestie, do not skip ahead 🌈
  • Enable ADC.
  • Restore calibration data.
  • Pre-select channels that may be used in PCSEL (required by input MUX / IO):
    • Only one input is selected for single ended (e.g. 'vinp')
    • Two inputs are selected for differential channels (e.g. 'vinp' & 'vinn')
like, the pre-select step isn't optional filler β€” the input MUX / IO literally requires it, so don't come for me if you skip it 😭

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/iio/adc/stm32-adc.c, plus the whole friend group:

struct stm32_adc_ic(9), struct stm32_adc_trig_info(9), struct stm32_adc_calib(9), struct stm32_adc_regs(9), struct stm32_adc_vrefint(9), struct stm32_adc_regspec(9), struct stm32_adc_cfg(9), struct stm32_adc(9), struct stm32_adc_info(9), stm32_adc_conv_irq_enable(9), stm32_adc_conv_irq_disable(9), stm32f4_adc_start_conv(9), stm32h7_adc_read_selfcalib(9), stm32h7_adc_restore_selfcalib(9), stm32h7_adc_selfcalib(9), stm32h7_adc_check_selfcalib(9), stm32_adc_conf_scan_seq(9), stm32_adc_get_trig_extsel(9), stm32_adc_set_trig(9), stm32_adc_single_conv(9), stm32_adc_validate_trigger(9), stm32_adc_debugfs_reg_access(9)


and that's the page!! sourced from . /drivers/iio/adc in October 2026 β€” luv u, go wake up that ADC, slay πŸ’–βœ¨

πŸ“¦ where this page comes from