mt6359_auxad...mple_adc_val(9)
π 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
- 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