mt6359_auxad...mple_adc_val(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

mt6359_auxadc_sample_adc_val β€” bestie, this one kicks off ADC channel sampling and then reads the value back out for you ✨


πŸŽ€ SYNOPSIS πŸŽ€

int mt6359_auxadc_sample_adc_val (struct mt6359_auxadc *adc_dev , const
       struct iio_chan_spec *chan , u32 *out );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • adc_dev β€” the main driver structure, like the whole vibe of the driver lives here πŸ‘‘
  • chan β€” the IIO channel spec for the ADC you're asking for, i.e. which channel you want sampled 🎯
  • out β€” a preallocated variable where the value read from HW gets dropped, so have it ready before you call, no cap πŸ’…

🌸 DESCRIPTION 🌸

Okay so here's the tea: this function starts the sampling for an ADC channel, then it waits until all of the samples are averaged (yes, all of them, it's patient like that 🧚), and then it reads the value from the HW. Slay.

⚠️ not me dropping the most important part ⚠️ β€” the caller must stop the ADC sampling on its own. This function never stops it. Like, ever. Not a single time. So if you forget, that's on you bestie 😭

⭐ RETURN ⭐

  • Negative number = it's giving error πŸ’€
  • On success it returns zero and writes the read value to *out β€” periodt 🫢

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/iio/adc/mt6359-auxadc.c
  • struct mt6359_auxadc(9)
  • struct mtk_pmic_auxadc_chan(9)
  • struct mtk_pmic_auxadc_info(9)

Go read those too, iykyk πŸ“š


and that's the whole page, bestie πŸ’– brought to you from <pink>./drivers/iio/adc</pink>, dated <purple>October 2026</purple>, and yes the header/footer still spells it <cyan>mt6359_auxad...mple_adc_val(9)</cyan> because truncation is iconic in its own way πŸŽ€βœ¨

πŸ“¦ where this page comes from