devm_gpio_request_one(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so this one's a legacy little guy from the Kernel API Manual, and yes it's still documented, and yes you still need to know what it does. buckle up πŸŽ€


✨ NAME ✨

devm_gpio_request_one β€” request a single GPIO with initial setup ⚑

like, one (1) GPIO. singular. with the setup already handled for you. slay.


πŸ¦‹ SYNOPSIS πŸ¦‹

int devm_gpio_request_one (struct device *dev , unsigned gpio , unsigned
long flags , const char *label );

literally that's the whole signature, copy it exactly please, no improvising πŸ’…


🌸 ARGUMENTS 🌸

  • dev β€” the device you're requesting this for, bestie. it's giving "who is this for" energy.
  • gpio β€” the GPIO number. just the number. don't overthink it 🧚
  • flags β€” GPIO configuration, as specified by GPIOF_*. the asterisk matters, iykyk ⭐
  • label β€” a literal description string of this GPIO. like, an actual string. so the humans can read it later 😭

πŸ’€ DESCRIPTION πŸ’€

DEPRECATED β€” This function is deprecated and must not be used in new code.

not me having to say this but fr fr: don't use this in anything new. it's deprecated, full stop. it's still here, it still works, but it is not the main character anymore πŸ™ˆ


🌈 RETURN 🌈

  • 0 on success πŸ’–
  • negative errno on failure 😭

that's it. that's the vibe check.


πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/gpio/gpiolib-legacy.c β€” note the "legacy" in the name, that's not a coincidence πŸ’€
  • gpio_request_one(9)

and that's the page, bestie! sourced straight from ./drivers/gpio, dated October 2026 β€” stay deprecated-adjacent and keep your errnos negative, love u πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from