devm_gpio_request_one(9)
π 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 byGPIOF_*. 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 π
0on 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
- 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