stm32_adc_de...s_reg_access(9)
π
stm32_adc_debugfs_reg_access β NAME
okay so bestie, this is stm32_adc_debugfs_reg_access β it literally reads or writes a register value, that's the whole gig β¨
We're in the Kernel API Manual, section 9, and honestly? icon era for kernel docs.
π SYNOPSIS
int stm32_adc_debugfs_reg_access (struct iio_dev *indio_dev , unsigned
reg , unsigned writeval , unsigned *readval );
she takes four things and gives you back an int, no cap π
πΈ ARGUMENTS
indio_devβ the IIO device structure π¦ like, the actual device we're poking atregβ the register offset π which register are we visiting todaywritevalβ the value to write π if you're in a writing moodreadvalβ the value to read πΈ pointer where the read value lands
β¨ DESCRIPTION
So here's the vibe check π«Ά:
To read a value from an ADC register: you echo the ADC reg offset into direct_reg_access, then cat it back out β like leaving a note and then reading your own note:
echo [ADC reg offset] > direct_reg_access
cat direct_reg_access
To write a value in a ADC register: you echo the register offset and the value into direct_reg_access β boom, written π
echo [ADC_reg_offset] [value] > direct_reg_access
that's it, that's the whole debugfs situation, we love a simple queen π
π₯ SEE ALSO
the kernel file doing all the heavy lifting: ./drivers/iio/adc/stm32-adc.c β and 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)stm32h7_adc_prepare(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)
go read them all, iykyk ππ
π sign-off
this little masterpiece lives in ./drivers/iio/adc, and it's stamped October 2026 β that's the source and the date, bestie, we're nothing if not documented πβ bye pookie, go read some registers π¦
π¦ 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