STRUCT PINCTRL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct pinctrl(9)

okay bestie, welcome to the Kernel API Manual β€” yes, that's the vibe we're on today β€” and we're talking about struct pinctrl, aka the per-device pin control state holder. it's literally the little holder thing that keeps track of a device's pin control situation. icon status. πŸ‘‘


✨ NAME ✨

struct pinctrl β€” per-device pin control state holder πŸŽ€

🌸 SYNOPSIS 🌸

not me about to show you the whole struct, bestie, look:

struct pinctrl {
    struct list_head node;
    struct device *dev;
    struct list_head states;
    struct pinctrl_state *state;
    struct list_head dt_maps;
    struct kref users;
 };

yes the formatting is a little crunchy, no we are not fixing it, it's giving "handed down through the generations" πŸ’€


πŸ¦‹ Members πŸ¦‹

every field gets its moment, periodt:

  • node β€” the global list node. it's how this thing gets threaded onto the big list. 🌈
  • dev β€” the device that's using this pin control handle. main character energy, honestly. πŸ’–
  • states β€” a list of states for this device. plural. a whole little collection. ✨
  • state β€” the current state. the one that's actually happening right now. slay. πŸ‘‘
  • dt_maps β€” the mapping table chunks that get dynamically parsed from the device tree for this device, if any. note the "if any" β€” sometimes there just aren't any, and that's fine, we don't judge. 🧚
  • users β€” the reference count. keep an eye on it or it'll keep an eye on you. πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

go read these next, iykwyk:

  • Kernel file ./drivers/pinctrl/core.h β€” start here, bestie, it's the source of truth 🫢
  • struct pinctrl_dev(9)
  • struct pinctrl_state(9)
  • struct pinctrl_setting_mux(9)
  • struct pinctrl_setting_configs(9)
  • struct pinctrl_setting(9)
  • struct pin_desc(9)
  • struct pinctrl_maps(9)
  • struct group_desc(9)

and the directory itself: ./drivers/pinctrl β€” go touch some kernel code πŸ“


lowkey a whole family of structs up in here. read them in order, don't skip, i'm watching. πŸ‘€

okay that's the whole page, bestie, and to sign off properly: this one comes from the source <pink>./drivers/pinctrl</pink>, dated **October 2026**, and the manual is struct pinctrl(9)`. no cap, that's literally everything. mwah πŸ’‹πŸ’…πŸ’œ

πŸ“¦ where this page comes from