of_get_named_gpiod_flags(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the of_get_named_gpiod_flags(9) page from the Kernel API Manual ✨ this one is literally about getting a GPIO descriptor and flags for the GPIO API, and I promise it's not scary β€” iykyk 🫢

🌸 NAME 🌸

of_get_named_gpiod_flags - Get a GPIO descriptor and flags for GPIO API

✨ SYNOPSIS ✨

okay so here's the whole signature, character for character, no cap:

struct gpio_desc * of_get_named_gpiod_flags (const struct device_node
       *np , const char *propname , int index , enum of_gpio_flags *flags );

πŸŽ€ ARGUMENTS πŸŽ€

here's what you're handing over, bestie:

  • np β€” device node to get GPIO from
  • propname β€” property name containing gpio specifier(s)
  • index β€” index of the GPIO
  • flags β€” a flags pointer to fill in

πŸ¦‹ RETURN πŸ¦‹

so what comes back? a GPIO descriptor to use with the Linux GPIO API, or one of the errno value on the error condition 😭 and if flags is not NULL, the function also fills in flags for the GPIO β€” cute, right? πŸ’…

🌈 SEE ALSO 🌈

go peek at these, bestie β€” Kernel file ./drivers/gpio/gpiolib-of.c, plus these related icons: of_gpio_named_count(9), of_gpio_spi_cs_get_count(9), of_gpiochip_remove_hog(9), of_gpio_twocell_xlate(9), of_gpio_threecell_xlate(9) πŸ‘‘


πŸ’– xoxo, bestie β€” this page is brought to you by source/version ./drivers/gpio, dated October 2026 πŸ’–

πŸ“¦ where this page comes from