pinctrl_match_gpio_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pinctrl_match_gpio_range(9) β€” from the Kernel API Manual, bestie ✨

okay so picture this: it's a Tuesday, you're deep in the kernel, and you need to know if some GPIO pin belongs to a pin controller's range. That's literally this function. Welcome to the group chat 🫢


🌸 NAME 🌸

pinctrl_match_gpio_range β€” the vibe check for "is this GPIO pin in range, or nah?" πŸ’…


✨ SYNOPSIS ✨

struct pinctrl_gpio_range * pinctrl_match_gpio_range (struct pinctrl_dev
*pctldev , struct gpio_chip *gc , unsigned int offset );

yep, three args, one pointer back. no cap ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • pctldev β€” the pin controller device you wanna check. like, the one under investigation πŸ”
  • gc β€” the GPIO chip structure, straight from the GPIO subsystem. it's the GPIO side of the story πŸ¦‹
  • offset β€” the hardware offset of the GPIO, relative to the controller. not absolute, okay? relative πŸ™ˆ

πŸ’– DESCRIPTION πŸ’–

So what it does: it tries to match a GPIO pin number to the ranges handled by a certain pin controller. That's the whole mission πŸ’«

If it matches, it returns the range. If it doesn't? NULL. That's it. Iconic, minimal, does one job and ate πŸ‘‘

fr fr, that's the entire behaviour β€” no hidden side quests, no plot twists.

🌈 SEE ALSO 🌈

Kernel file: ./drivers/pinctrl/core.c

and the whole extended friend group that comes with it (yes, all of them, I'm not skipping a single one, that would be rude πŸ’€):


that's the whole page, bestie πŸ“ it lives in ./drivers/pinctrl, this version is dated October 2026, and the manual name is pinctrl_match_gpio_range(9) in case you forgot already 😭 go forth and match some ranges πŸ’œπŸ§š

πŸ“¦ where this page comes from