intel_pin_to_gpio(9)
β¨ intel_pin_to_gpio π
okay so bestie, this is a page from the Kernel API Manual (section 9, the kernel-y one π§) and it's literally all about intel_pin_to_gpio β the little function that does the glow-up from pin number to GPIO offset. no cap, that's the whole vibe of it. π¦
πΈ SYNOPSIS πΈ
int intel_pin_to_gpio (const struct intel_pinctrl *pctrl , int pin );
that's the whole signature, bestie β int in, int out, two args, iconic. π
π ARGUMENTS π
pctrlβ the pinctrl structure π«Ά (yes, theconst struct intel_pinctrl *one, she's const so hands off)pinβ the pin number, anint, just a number, that's her whole job π
π DESCRIPTION π
so what she does is take the pin number from that pinctrl and translate it into a GPIO offset. that's it. that's the function. lowkey obsessed with how straightforward she is β¨
π RETURN π
she hands you back a GPIO offset π β¦or a negative error code if the translation can't be done π (so like, vibe check your return value, fr fr β don't just assume it's a happy little offset).
ngl, a negative error code is not a GPIO offset, so check before you use it. π¨
β SEE ALSO β
- the Kernel file
./drivers/pinctrl/intel/pinctrl-intel.cβ she's the source file, the main character energy of this whole operation π enum (anonymous)(9)πenum (anonymous)(9)π (yes, she's listed twice β twice the anonymous enum, twice the mystery, iykyk)intel_gpio_to_pin(9)β the reverse-glow-up queen π¦intel_gpio_add_pin_ranges(9)β the other sibling in this little pinctrl family πΈ
and that's the tea π β this page lives in ./drivers/pinctrl/intel, dated October 2026, from the Kernel API Manual, and she's called intel_pin_to_gpio(9). periodt. πβ¨
π¦ 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