pinmux_can_be_used_for_gpio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pinmux_can_be_used_for_gpio(9) β€” a Kernel API Manual moment πŸŽ€

okay so bestie, this is a page straight out of the Kernel API Manual and it's genuinely such a little icon. it's about one function, and its whole job is answering one (1) question: is this pin busy doing something else, or is it out here living its gpio life? let's get into it ✨


🌸 NAME 🌸

pinmux_can_be_used_for_gpio β€” check if a specific pin is either muxed to a different function or used as gpio.

like, that's the whole vibe check. muxed elsewhere? already gpio? this function wants to know 🫢


✨ SYNOPSIS ✨

bool pinmux_can_be_used_for_gpio (struct pinctrl_dev *pctldev , unsigned
int pin );

so it hands you back a bool, and it takes a struct pinctrl_dev *pctldev plus an unsigned int pin. that's it. no cap πŸ¦‹


πŸŽ€ ARGUMENTS πŸŽ€

  • pctldev β€” the associated pin controller device. like, the controller this whole situation belongs to πŸ‘‘
  • pin β€” the pin number in the global pin space. yes, global. it's not a little local number, it's the big-world pin number 🌈

πŸ’– DESCRIPTION πŸ’–

here's the tea: controllers that are not defined as strict will always return true β€” meaning that the gpio can be used. always. every time. no drama, no checking, just true and move on 😌

so if your controller isn't strict, this function is basically that friend who says "yeah babe go for it" before you've even finished the sentence πŸ’€

ngl, the takeaway is the strict vs not strict distinction β€” the non-strict ones don't gatekeep, they return true and let the gpio be used, periodt.

πŸ”₯ SEE ALSO πŸ”₯

lowkey a whole friend group, iykyk:


and that's the page, bestie πŸ’œ sourced from ./drivers/pinctrl, dated October 2026, and filed under pinmux_can_be_used_for_gpio(9) β€” slay, go read the whole pinmux cinematic universe 🧚⭐

πŸ“¦ where this page comes from