STRUCT GPIO_EXTCON_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct gpio_extcon_data(9) β€” like, the whole vibe

okay bestie, welcome to the Kernel API Manual entry for struct gpio_extcon_data β€” no cap, it's just a lil container that holds the state for a super simple, GPIO-controlled extcon device. that's it. that's the whole thing. slay. ✨


πŸŽ€ NAME

struct gpio_extcon_data β€” a simple GPIO-controlled extcon device state container. literally just a struct whose whole job is holding onto the state of a GPIO-driven external connector. lowkey iconic of it. πŸ’–


✨ SYNOPSIS

struct gpio_extcon_data {
    struct extcon_dev *edev;
    struct delayed_work work;
    unsigned long debounce_jiffies;
    struct gpio_desc *gpiod;
    unsigned int extcon_id;
    unsigned long debounce;
    bool check_on_resume;
 };

yes the indentation in the original is like that, we don't gatekeep. copy it exactly, bestie. 🫢


🌸 Members

  • edev β€” the extcon device. you know, the actual extcon thang this whole struct is being the state container for. main character energy. πŸ‘‘
  • work β€” the work that gets fired by the interrupt. when the IRQ goes off, this is the delayed work that actually does the doing. πŸ”₯
  • debounce_jiffies β€” the number of jiffies to wait for the GPIO to stabilize. where does the number come from? the debounce value, obviously. iykyk. ⏳
  • gpiod β€” the GPIO descriptor for this external connector. the actual pin, described. πŸ¦‹
  • extcon_id β€” the unique id of the specific external connector. unique! specific! that's the whole point! πŸ’…
  • debounce β€” debounce time for the GPIO IRQ, measured in ms. milliseconds, not jiffies, don't mix them up bestie, that's how you get a vibe check failure. 😭
  • check_on_resume β€” a boolean describing whether to check the state of the gpio while resuming from sleep. true = yes check it, false = don't. that's it. 🌈

πŸ‘€ SEE ALSO

  • Kernel file ./drivers/extcon/extcon-gpio.c β€” go read it, it's right there, it's giving source code realness. πŸ“‚

k bye ily πŸ’– this page came out of ./drivers/extcon, dated October 2026, straight from the Kernel API Manual β€” and honestly? she ate. β­πŸ§šπŸ’œ

πŸ“¦ where this page comes from