stm32_adc_de...s_reg_access(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 at
  • reg β€” the register offset πŸ‘‘ which register are we visiting today
  • writeval β€” the value to write πŸŽ€ if you're in a writing mood
  • readval β€” 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:

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