gpio_request_one(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ gpio_request_one ✨

okay bestie, so this one is from the Kernel API Manual (section 9, we love a kernel function moment πŸ’…) and it's literally called gpio_request_one β€” iconic name, honestly.


🌸 NAME 🌸

gpio_request_one β€” request a single GPIO with initial configuration πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

int gpio_request_one (unsigned gpio , unsigned long flags , const char *label );

πŸ’– ARGUMENTS πŸ’–

  • gpio β€” the GPIO number, like which one are we talking about bestie πŸ‘€
  • flags β€” the GPIO configuration, as specified by GPIOF_* (yes, that whole family ✨)
  • label β€” a literal description string of this GPIO, so everyone knows what it is 🏷️

πŸ”₯ DESCRIPTION πŸ”₯

⚠️ DEPRECATED ⚠️

not me having to tell you this but: this function is deprecated and must not be used in new code. like, fr fr, do not. it's giving legacy energy πŸ’€

🌈 RETURN 🌈

0 on success, or a negative errno on failure. that's it, that's the vibe check 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/gpio/gpiolib-legacy.c
  • devm_gpio_request_one(9) β€” the one you probably actually want, iykyk πŸ’œ

and that's the whole page bestie, no cap 🧚 from ./drivers/gpio, dated October 2026, in the Kernel API Manual β€” slay, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from