STRUCT SAMSUNG_PIN_CTRL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

struct samsung_pin_ctrl β€” represent a pin controller. πŸ’…

okay so this is straight out of the Kernel API Manual, and it's the little struct that's basically the main character of a Samsung pin controller. she holds the receipts: which pin banks she's got, how many, her retention config, and all her platform-specific callback besties. πŸŽ€


✨ SYNOPSIS ✨

       struct samsung_pin_ctrl {
           const struct samsung_pin_bank_data *pin_banks;
           unsigned int    nr_banks;
           unsigned int    nr_ext_resources;
           const struct samsung_retention_data *retention_data;
           int (*eint_gpio_init)(struct samsung_pinctrl_drv_data *);
           int (*eint_wkup_init)(struct samsung_pinctrl_drv_data *);
           void (*pud_value_init)(struct samsung_pinctrl_drv_data *drvdata);
           void (*suspend)(struct samsung_pin_bank *bank);
           void (*resume)(struct samsung_pin_bank *bank);
        };

like, that's her. that's the whole vibe. nine lines of pure pin-controller energy. πŸ”₯


πŸŽ€ Members πŸŽ€

  • pin_banks β€” the list of pin banks included in this controller. her whole crew, lowkey. 🫢
  • nr_banks β€” number of pin banks. yes bestie, we're counting. πŸ”’
  • nr_ext_resources β€” number of the extra base address for pin banks. extra. base. address. she's giving "there's more than one address involved" and I respect it. ✨
  • retention_data β€” configuration data for retention control. the ✨settings✨ for keeping stuff alive, basically. πŸ’–
  • eint_gpio_init β€” platform specific callback to setup the external gpio interrupts for the controller. gpio? handled. πŸ‘‘
  • eint_wkup_init β€” platform specific callback to setup the external wakeup interrupts for the controller. wakeup duty, claimed. ⭐
  • pud_value_init β€” ngl bestie, the manual literally does not describe this one 😭 she's just sitting there in the struct with her struct samsung_pinctrl_drv_data *drvdata argument and zero commentary. iconic of her honestly. πŸ’€
  • suspend β€” platform specific suspend callback, executed during pin controller device suspend, see samsung_pinctrl_suspend. she goes to sleep on cue. 😴
  • resume β€” platform specific resume callback, executed during pin controller device suspend, see samsung_pinctrl_resume. yep, the manual says "suspend" right there in the resume description too β€” we're keeping it exactly as written, no notes. πŸ™ˆ

πŸ¦‹ Description πŸ¦‹

okay so here's the important part, pay attention: external wakeup interrupts must define at least eint_wkup_init, retention_data and suspend in order for proper suspend/resume to work. 🚨

like, that's the requirement. all three. no skipping. if you're doing external wakeup interrupts, those three are non-negotiable bestie β€” otherwise your suspend/resume is gonna be a whole mess. 🫢


🫢 SEE ALSO 🫢

kernel file ./drivers/pinctrl/samsung/pinctrl-samsung.h, plus the whole friend group:

  • enum pincfg_type(9)
  • enum eint_type(9)
  • struct samsung_pin_bank_type(9)
  • struct samsung_pin_bank_data(9)
  • struct samsung_pin_bank(9)
  • struct samsung_retention_data(9)
  • struct samsung_pinctrl_drv_data(9)
  • struct samsung_pinctrl_of_match_data(9)
  • struct samsung_pin_group(9)
  • struct samsung_pmx_func(9)

go read them all, they're lowkey obsessed with each other. πŸ’œ


and that's the page!! πŸŽ€ source: ./drivers/pinctrl/samsung, dated October 2026 β€” slay, love that for us. periodt πŸ’…βœ¨

πŸ“¦ where this page comes from