STRUCT TWL4030_MADC_REQUEST(9)
π NAME π
ok so bestie, let me introduce you to struct twl4030_madc_request β it's literally the madc request packet for channel conversion β¨ like that's its whole thing, that's the vibe π
π¦ SYNOPSIS π¦
struct twl4030_madc_request {
unsigned long channels;
bool do_avg;
u16 method;
u16 type;
bool active;
bool result_pending;
bool raw;
int rbuf[TWL4030_MADC_MAX_CHANNELS];
};
like, that's the whole struct, no cap π
πΈ MEMBERS πΈ
okay now we go field by field, bestie, stay with me π«Ά
channelsβ a 16 bit bitmap for individual channels π so like, one bit per channel, iconic little bitmap momentdo_avgβ when you turn this on it samples the input channel for 4 consecutive cycles β¨ yes, four, not three, not five, four πmethodβRT,SW1,SW2β those are the options, periodt, don't ask me for more πtypeβ the method type: polling or interrupt based π pick your fighteractiveβ flag if request is active π₯ like "is this thing on" energyresult_pendingβ flag from the irq handler, that result is ready π the irq handler said "it's done" and this flag is the receiptrawβ return raw value, do not convert it π§ like, leave it alone, it's fine as it isrbufβ result buffer π it's anintarray sizedTWL4030_MADC_MAX_CHANNELS, that's where the results live
β SEE ALSO β
- the kernel file
./drivers/iio/adc/twl4030-madc.c, which is also a struct π twl4030_madc_data(9)twl4030_madc_channel_raw_read(9)twl4030_madc_set_current_generator(9)
go read those too, iykyk π
aaaand that's the page, bestie!! π it lives over in ./drivers/iio/adc, dated October 2026 β Kernel API Manual energy from start to finish, slay ππ
π¦ 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