twl4030_madc...nt_generator(9)
β¨ twl4030_madc_set_current_generator π
okay bestie, welcome to the Kernel API Manual β yes that's the manual name, we're doing this properly π this one's a tiny lil function but it's lowkey iconic, so let's get into it.
πΈ NAME πΈ
twl4030_madc_set_current_generator β literally just setups the bias current, that's the whole vibe π
β¨ SYNOPSIS β¨
int twl4030_madc_set_current_generator (struct twl4030_madc_data *madc ,
int chan , int on );
three args, one int back, no drama. periodt π«Ά
π¦ ARGUMENTS π¦
madcβ a pointer to thetwl4030_madc_datastruct π§ that's your main character right therechanβ bestie this one has two whole moods, pick one:0β Enables bias current for main battery type reading π1β Enables bias current for main battery temperature sensing π‘οΈ
onβ enable or disablechan. that's it. flip the switch, slay π
π₯ DESCRIPTION π₯
so the function's whole job? enable or disable that bias current β either for the main battery type reading, or for the temperature sensing, depending on which chan you handed it. not me being obsessed with a current generator but here we are π
no cap, that's the entire function. short, sweet, does exactly what it says on the tin β¨
π SEE ALSO π
- Kernel file
./drivers/iio/adc/twl4030-madc.cπ struct twl4030_madc_request(9)struct twl4030_madc_data(9)twl4030_madc_channel_raw_read(9)
iykyk, go read those next π
ngl this page is a short one but every detail is here fr fr β don't come for me, come for the source: ./drivers/iio/adc π
and that's a wrap bestie π huge shoutout to the kernel source in ./drivers/iio/adc, dated October 2026 β mwah, love that for us πππ
π¦ 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