STRUCT ADC_JACK_COND(9)
π NAME π
ok so bestie, struct adc_jack_cond β it's literally the condition to use an extcon state, and it denotes the last adc_jack_cond element among the array (iykyk, the paren is part of the lore).
β¨ SYNOPSIS β¨
struct adc_jack_cond {
unsigned int id;
u32 min_adc;
u32 max_adc;
};
π Members π
idβ the unique id of each external connector. one of a kind, main character energy, no duplicates bestie πmin_adcβ min adc value for this condition. the floor, the bare minimum, the limitmax_adcβ max adc value for this condition. the ceiling, the whole entire top π«Ά
π¦ Description π¦
ok so picture this πΈ β if you've got { .state = 0x3, .min_adc = 100, .max_adc = 200}, that means: if the ADC value is between (inclusive, like both ends count, 100 and 200 are in the club) 100 and 200, then the cable 0 and cable 1 are attached. the math is (1<<0 | 1<<1 == 0x3) and honestly? she ate π₯
π big note bestie β you do NOT need to describe a condition for "no cable attached". the way that's handled for you: when noadc_jack_condis met,state = 0is automatically chosen. so like, the default is already iconic, don't do extra work for it β¨
π SEE ALSO π
- Kernel file
./include/linux/extcon/extcon-adc-jack.h struct adc_jack_pdata(9)
and that's the whole vibe check π§π this page lives in ./include/linux/extcon, dated October 2026, and it's serving struct adc_jack_cond(9) realness from the Kernel API Manual. slay, periodt π
π
π¦ 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