gpio_device_find_by_label(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ gpio_device_find_by_label ✨

okay so bestie, welcome to the Kernel API Manual, section 9 πŸ’… β€” this is the page for gpio_device_find_by_label(9), and it's honestly such a lil cutie. No cap.


πŸŽ€ NAME πŸŽ€

gpio_device_find_by_label β€” it's literally just a wrapper around gpio_device_find() that finds the GPIO device by its backing chip's label πŸ¦‹


🌸 SYNOPSIS 🌸

struct gpio_device * gpio_device_find_by_label (const char *label );

yes that's the whole thing, she's short and she knows it πŸ‘‘


πŸ’– ARGUMENTS πŸ’–

  • label β€” the label you wanna look up πŸ” like, that's the whole argument, that's the assignment

🌈 RETURN 🌈

You get back a reference to the GPIO device, or NULL 😭 (so pls check, fr fr).

⚠️ that reference must be released with gpio_device_put β€” not optional, not "later maybe", release it. periodt πŸ’…

πŸ‘‘ SEE ALSO πŸ‘‘

The kernel file lives at ./drivers/gpio/gpiolib.c 🫢 β€” and here's the whole friend group, no one gets left out:


and that's the page, bestie!! πŸ¦‹ this lil gem comes from ./drivers/gpio, stamped October 2026 β€” go release your references and slay πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from