STRUCT ADC_JACK_COND(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 limit
  • max_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 no adc_jack_cond is met, state = 0 is 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