STRUCT CRYSTALCOVE_GPIO(9)
β¨ struct crystalcove_gpio(9) β¨
okay so bestie, this is a page out of the Kernel API Manual β we're talking the struct crystalcove_gpio, aka the Crystal Cove GPIO controller π
. It's a struct, it's got members, it's giving "small but mighty driver bookkeeping" energy. Let's get into it π«Ά
πΈ NAME πΈ
struct crystalcove_gpio β the Crystal Cove GPIO controller π like, that's the whole vibe. It's the struct that holds the controller's state. Obsessed.
π¦ SYNOPSIS π¦
struct crystalcove_gpio {
struct mutex buslock;
struct gpio_chip chip;
struct regmap *regmap;
int update;
int intcnt_value;
bool set_irq_mask;
};
look at her. six members. absolutely iconic layout ngl β¨
π Members π
buslockβ this one's for bus lock/sync and unlock π. It's the mutex doing the "one at a time please" thing so nobody clobbers anybody. periodt.chipβ the abstractgpio_chipstructure π«. The generic, platonic-ideal version of a GPIO chip β the real one lives here, iykyk.regmapβ theregmapthat comes from the parent device π. That's where the register access actually happens.updateβ pending IRQ setting update π₯, which is going to be written to the chip upon unlock. So it's queued up, just chilling, waiting for its moment. main character energy honestly.intcnt_valueβ the Interrupt Detect value to be written π. That's the number that's gonna get pushed out when the time comes.set_irq_maskβtrueif the IRQ mask needs to be set,falseto clear it π. Binary queen. No in-between.
lowkey a lot of these fields only make sense together βupdatewaits for the unlock,intcnt_valuegets written,set_irq_maskdecides set-vs-clear. Teamwork fr fr π§
β SEE ALSO β
- Kernel file
./drivers/gpio/gpio-crystalcove.cβ go read the source bestie, that's where all the actual behaviour lives π
and that's the whole page!! no cap, that's it. this gem comes to you from ./drivers/gpio and it's dated October 2026 πΈ mwah, go forth and GPIO responsibly ππ¦β¨
π¦ 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