STRUCT GPIOD_LOOKUP(9)
β¨ NAME β¨
struct gpiod_lookup β it's the lookup table, bestie π
(and yes, this is the struct gpiod_lookup(9) page from the Kernel API Manual, we're getting into it)
π SYNOPSIS π
struct gpiod_lookup {
const char *key;
u16 chip_hwnum;
const char *con_id;
unsigned int idx;
unsigned long flags;
};
π¦ Members π¦
keyβ ngl this one's doing double duty π It's either the name of the chip the GPIO belongs to, or the GPIO line name. But listen β GPIO line names are not guaranteed to be globally unique, so this is gonna use the first match found! No cap, first one wins, that's just how it is πchip_hwnumβ the hardware number of the GPIO, i.e. relative to the chip π§ Or you can dropU16_MAXin here to say "hey,keyis actually a GPIO line name" πcon_idβ the name of the GPIO from the device's point of view π«Ά Like, how the device sees it, not the chip.idxβ the index of the GPIO, for when several GPIOs are sharing the same name π (squad goals but make it ambiguous)flagsβ a bitmask ofgpio_lookup_flagsGPIO_*values β
πΈ Description πΈ
Okay so gpiod_lookup is literally a lookup table for associating GPIOs to specific devices and functions using platform data β¨ That's the whole vibe. It's the little matchmaker between your GPIOs and the devices that need them π
π SEE ALSO π
- Kernel file
./include/linux/gpio/machine.hπ
That's the whole page, bestie β no crumbs left π
Sending you off with the source/version line: this lil beauty lives in ./include/linux/gpio and it's stamped October 2026 π Now go forth and lookup, you icon π¦β¨
π¦ 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