pinctrl_match_gpio_range(9)
π 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 π):
pinctrl_provide_dummies(9)get_pinctrl_dev_from_devname(9)pin_get_from_name(9)pin_get_name(9)gpio_to_pin(9)pinctrl_ready_for_gpio_range(9)pinctrl_get_device_gpio_range(9)pinctrl_add_gpio_range(9)pinctrl_find_gpio_range_from_pin(9)pinctrl_remove_gpio_range(9)pinctrl_generic_get_group_count(9)pinctrl_generic_get_group_name(9)pinctrl_generic_get_group_pins(9)pinctrl_generic_get_group(9)pinctrl_generic_add_group(9)pinctrl_generic_remove_group(9)pinctrl_generic_free_groups(9)pinctrl_get_group_selector(9)pinctrl_gpio_request(9)pinctrl_gpio_free(9)pinctrl_gpio_direction_input(9)pinctrl_gpio_direction_output(9)pinctrl_gpio_set_config(9)pinctrl_gpio_get_config(9)pinctrl_get(9)pinctrl_release(9)pinctrl_put(9)pinctrl_lookup_state(9)pinctrl_commit_state(9)pinctrl_select_state(9)devm_pinctrl_get(9)devm_pinctrl_put(9)pinctrl_register_mappings(9)pinctrl_unregister_mappings(9)devm_pinctrl_register_mappings(9)pinctrl_force_sleep(9)pinctrl_force_default(9)pinctrl_init_done(9)pinctrl_select_default_state(9)pinctrl_pm_select_default_state(9)pinctrl_pm_select_init_state(9)pinctrl_pm_select_sleep_state(9)pinctrl_pm_select_idle_state(9)pinctrl_init_controller(9)pinctrl_register(9)pinctrl_register_and_init(9)pinctrl_unregister(9)devm_pinctrl_register(9)devm_pinctrl_register_and_init(9)
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
- 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