gpiod_to_chip(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay bestie, this is the gpiod_to_chip(9) page from the Kernel API Manual, and the name is literally: return the GPIO chip to which a GPIO descriptor belongs. cute concept, kinda cursed execution β€” keep reading. πŸ’…

🌸 SYNOPSIS 🌸

struct gpio_chip * gpiod_to_chip (const struct gpio_desc *desc );

πŸŽ€ ARGUMENTS πŸŽ€

  • desc β€” the descriptor to return the chip of. like, β€œwhich chip does this descriptor belong to?” energy. 🫢

πŸ’€ DESCRIPTION πŸ’€

the page opens with *DEPRECATED* and bestie, it is not being dramatic: this function is unsafe and should not be used. periodt. πŸ›‘

Using the chip address without taking the SRCU read lock may result in dereferencing a dangling pointer. that's the whole warning, and it's giving β€œdo not touch” energy. 😭

πŸ”₯ RETURN πŸ”₯

Address of the GPIO chip backing this device. that's the return value, no cap. ✨

🌈 SEE ALSO 🌈

okay here's the whole extended fam β€” the kernel file is ./drivers/gpio/gpiolib.c, and every single one of these is invited:


okay byeee 🫢 β€” this page lives under ./drivers/gpio, dated October 2026, and it's literally still gpiod_to_chip(9). mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from