STRUCT SPEAR_PINCTRL_MACHDATA(9)
π 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 inpins.functionsβ an array describing all the mux functions the SoC supports. very "here's everything I can be" energy β¨nfunctionsβ the number of entries infunctions.groupsβ an array describing all the pin groups the pin SoC supports.ngroupsβ the number of entries ingroups.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. au16, iconically.pmx_modesβ array of modes supported by the SoC.npmx_modesβ number of entries inpmx_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
- 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