STRUCT PIN_DESC(9)
π struct pin_desc(9) β the Kernel API Manual, but make it make sense
okay bestie, so this page is struct pin_desc from the Kernel API Manual, section 9, and it's literally the whole vibe of "one descriptor per physical pin in the arch". No cap. Let's get into it π
β¨ NAME β¨
struct pin_desc β the pin descriptor for each physical pin in the arch π¦
πΈ SYNOPSIS πΈ
struct pin_desc {
struct pinctrl_dev *pctldev;
const char *name;
bool dynamic_name;
void *drv_data;
#ifdef CONFIG_PINMUX;
unsigned int mux_usecount;
const char *mux_owner;
const struct pinctrl_setting_mux *mux_setting;
const char *gpio_owner;
struct mutex mux_lock;
#endif;
};
likeβ¦ look at her. iconic. π«Ά
π Members π
pctldevβ the corresponding pin control device. her home base, her main character device πnameβ a name for the pin, e.g. the name of the pin/pad/finger on a datasheet or such. yes, finger. we love a datasheet β¨dynamic_nameβ tells you if the name of this pin was dynamically allocated. so like, did somebody malloc her name or not πdrv_dataβ driver-defined per-pin data. and listen: the pinctrl core does not touch this. hands off, bestie πmux_usecountβ if zero, the pin is not claimed, and owner should beNULL. if non-zero, this pin is claimed by owner. and the reason this field is an integer rather than a boolean? becausepinctrl_getmight process multiple mapping table entries that refer to β and hence claim β the same group or pin, and each of these will increment the usecount. so it's a counter, not a little yes/no flag. slay for the reasons π₯mux_ownerβ the name of device that calledpinctrl_get. πmux_settingβ the most recent selected mux setting for this pin, if any. keyword if any πgpio_ownerβ ifpinctrl_gpio_requestwas called for this pin, this is the name of the GPIO that "owns" this pin. note the very dramatic quotes around "owns" π
π SEE ALSO π
Kernel file ./drivers/pinctrl/core.h β go read her, she has lore π§
struct pinctrl_dev(9)struct pinctrl(9)struct pinctrl_state(9)struct pinctrl_setting_mux(9)struct pinctrl_setting_configs(9)struct pinctrl_setting(9)struct pinctrl_maps(9)struct group_desc(9)
like a whole friend group honestly π
and that's the whole page, bestie β this one lives in ./drivers/pinctrl, dated October 2026, source/version line and all. go touch some pins π
π¦ 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