STRUCT SPEAR_PINCTRL_MACHDATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so this is struct spear_pinctrl_machdata β€” the machine driver configuration situation for the SPEAr pin controller. that's the whole vibe. it's the struct that tells the pin controller what it's working with 🫢

(this is from the Kernel API Manual, bestie β€” yes, the actual kernel docs, we're fancy now πŸ‘‘)


✨ SYNOPSIS ✨

like, here's the literal shape of it, no notes:

struct spear_pinctrl_machdata {
    const struct pinctrl_pin_desc *pins;
    unsigned npins;
    struct spear_function **functions;
    unsigned nfunctions;
    struct spear_pingroup **groups;
    unsigned ngroups;
    struct spear_gpio_pingroup *gpio_pingroups;
    void (*gpio_request_endisable)(struct spear_pmx *pmx, int offset,
bool enable);
    unsigned ngpio_pingroups;
    bool modes_supported;
    u16 mode;
    struct spear_pmx_mode **pmx_modes;
    unsigned npmx_modes;
 };

πŸŽ€ Members πŸŽ€

okay so let's go through every single one, because we don't skip πŸ’…

  • pins β€” an array describing all the pins this pin controller affects. and listen, this part is important: all pins that are also GPIOs have to be listed first inside the array, and they have to be numbered identically to the GPIO controller's numbering. no cap, that's a real requirement, don't freestyle it πŸ™ˆ
  • npins β€” the number of entries in pins.
  • functions β€” an array describing all the mux functions the SoC supports. very "here's everything I can be" energy ✨
  • nfunctions β€” the number of entries in functions.
  • groups β€” an array describing all the pin groups the pin SoC supports.
  • ngroups β€” the number of entries in groups.
  • gpio_pingroups β€” gpio pingroups πŸ¦‹
  • ngpio_pingroups β€” gpio pingroups count.
  • modes_supported β€” does the SoC support modes? that's it, that's the question (bool, so it's a yes/no situation).
  • mode β€” mode configured from probe. a u16, iconically.
  • pmx_modes β€” array of modes supported by the SoC.
  • npmx_modes β€” number of entries in pmx_modes.
tiny heads up, bestie: gpio_request_endisable shows up in the struct up there but doesn't get its own Members blurb in this page. not me leaving it un-described β€” that's just what the docs give us, so I'm not gonna make stuff up πŸ’€

🌈 SEE ALSO 🌈

go look at these, they're all in the kernel file ./drivers/pinctrl/spear/pinctrl-spear.h:

  • struct spear_pmx_mode(9)
  • struct spear_muxreg(9)
  • struct spear_modemux(9)
  • struct spear_pingroup(9)
  • struct spear_function(9)
  • struct spear_pmx(9)

and that's the whole page, periodt πŸ’… this little legend lives at ./drivers/pinctrl/spear, dated October 2026, and the manual page itself is struct spea...trl_machdata(9) β€” practically a main character with a name too long for the header πŸŽ€ slay, go read the kernel source, iykyk πŸ’–

πŸ“¦ where this page comes from