intel_gpio_to_pin(9)
π intel_gpio_to_pin(9) β the kernel API manual, bestie edition π
okay so picture this: you're deep in the kernel API manual (yes, that one), and the page is literally called intel_gpio_to_pin π that's the whole vibe. it's a function, it translates things, and it's about to eat. let's get into it β¨
πΈ NAME πΈ
intel_gpio_to_pin β translate from GPIO offset to pin number π₯ like, the whole personality of this function is conversion. it takes a GPIO offset and is like "ok but what's your pin number tho" π
β¨ SYNOPSIS β¨
int intel_gpio_to_pin (const struct intel_pinctrl *pctrl , unsigned int
offset , const struct intel_community **community , const struct
intel_padgroup **padgrp );
look at that signature. four arguments, returns an int, no cap. she's got range π
π¦ ARGUMENTS π¦
pctrlβ the pinctrl structure π«Ά that's your main character right there, the pinctrl struct itself.offsetβ the GPIO offset, straight from gpiolib π that's the number you're rolling in with.communityβ the community gets filled in here if it's notNULLπ so if you pass a real pointer, she writes the community into it. if you passNULL, she simply does not. iconic.padgrpβ the pad group gets filled in here if it's notNULLβ same energy, different pointer.NULL? cool, she skips it. notNULL? she's loading it up for you.
π DESCRIPTION π
okay so here's the lore π when you come through gpiolib irqchip, the GPIO offset is not automatically translated to a pinctrl pin number π like it just doesn't happen, nobody does it for you, you're on your own bestie.
that's where this function comes in π
you use intel_gpio_to_pin to find out the corresponding pinctrl pin. that's it, that's the job, and she does it beautifully πΈ
ngl this is the kind of function that exists purely because the automatic path ghosts you π
π₯ RETURN π₯
she gives you back:
- a pin number β
- pointers to the community and pad group which the pin belongs to π«Ά
- or a negative error code if the translation can't be done π (translation said "no", and that's valid)
π SEE ALSO π
- the kernel file
./drivers/pinctrl/intel/pinctrl-intel.cπ that's where the magic lives enum (anonymous)(9)β yes, twice, she's listed twice, and honestly? slay πintel_pin_to_gpio(9)π the reverse bestie, the other direction of the same love storyintel_gpio_add_pin_ranges(9)β¨
and that's the whole page, bestie π§π no notes, she ate β brought to you by ./drivers/pinctrl/intel, dated October 2026, filed under intel_gpio_to_pin(9) ππ
π¦ 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