STRUCT IADC_CHIP(9)
β¨ NAME β¨
okay so bestie, this page is struct iadc_chip β literally the IADC Current ADC device structure, and we're reading it out of the Kernel API Manual</>, section 9, iykyk π
π¦ SYNOPSIS π¦
here's the whole vibe of the struct, no cap, every field exactly as it is:
struct iadc_chip {
struct regmap *regmap;
struct device *dev;
u16 base;
bool poll_eoc;
u32 rsense[2];
u16 offset[2];
u16 gain;
struct mutex lock;
struct completion complete;
};
πΈ Members πΈ
okay so let's go member by member, because the way each one has a job is genuinely iconic π
regmapβ theregmapused for register read/write. that's the whole thing, she reads and she writes β¨devβ this device pointer. main character energy fr fr πbaseβ the base offset for the ADC peripheral.poll_eocβ poll for end of conversion instead of waiting for the IRQ. yes bestie, she's impatient, she's polling π₯rsenseβ the values of the internal and external sense resister in micro Ohms. (yes, "resister", that's literally what the page says, don't come for me π)offsetβ raw offset values for the internal and external channels.gainβ the raw gain of the channels.lockβ the ADC lock for access to the peripheral. no two threads in the club at once πcompleteβ the ADC notification after the end of conversion interrupt is received.
π₯ SEE ALSO π₯
- Kernel file
./drivers/iio/adc/qcom-spmi-iadc.cβ go read her, she's the real source of truth β
lowkey that's the whole page, bestie β nothing hidden, nothing skipped, everything's up there π«Ά
and for the cute sign-off: this fab little doc came out of ./drivers/iio/adc and it's dated October 2026, so likeβ¦ future vibes but make it kernel ππ«
π¦ 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