pinctrl_read...r_gpio_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pinctrl_read...r_gpio_range(9) β€” Kernel API Manual, but make it make sense

okay so bestie, welcome to the Kernel API Manual ✨ we're looking at pinctrl_ready_for_gpio_range today and honestly? she's a vibe checker. she does not do anything, she just tells you if things are ready. icon behavior tbh πŸ‘‘


✨ NAME ✨

pinctrl_ready_for_gpio_range β€” check if other GPIO pins of the same GPIO chip are in range πŸŽ€


🌸 SYNOPSIS 🌸

bool pinctrl_ready_for_gpio_range (struct gpio_chip *gc , unsigned int offset );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gc β€” the GPIO chip structure, straight from the GPIO subsystem 🫢 like, the whole chip, not just one pin
  • offset β€” the hardware offset of the GPIO relative to the controller. yes, relative to the controller, don't come at me with absolute numbers πŸ’€

πŸ’œ DESCRIPTION πŸ’œ

so this one is the complement of pinctrl_match_gpio_range β€” they're giving duo energy, iykyk 🌈

here's the tea: if the return value of pinctrl_match_gpio_range is NULL, you can use this function to check whether the pinctrl device is ready or not. lowkey a glow-up move ✨

and like… maybe some GPIO pins of the same GPIO chip just don't have a back-end pinctrl interface? not their fault, they're doing their best πŸ™ˆ

so, vibe check time:

  • if the return value is true β†’ the pinctrl device is ready & that certain GPIO pin doesn't have a back-end pinctrl device. slay, mystery solved πŸ’…
  • if the return value is false β†’ the pinctrl device may not be ready. main character is still getting ready, give her a minute 😭
ngl "may not be ready" is doing a lot of heavy lifting there β€” that's the manpage's wording, not mine, so don't @ me πŸ”₯

πŸ‘‘ SEE ALSO πŸ‘‘

all the siblings and cousins fr fr, in the kernel file ./drivers/pinctrl/core.c:

that's the whole group chat, no one left on read πŸ’–


okay that's the page!! sign-off time bestie πŸŽ€ this little beauty lives in ./drivers/pinctrl and the date on it is October 2026 β€” so she's from the future, obviously, and she ate 🌟 bye pookie, go check your ranges πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from