STRUCT GPIO_GENERIC_CHIP_CONFIG(9)
πΈ NAME πΈ
okay so this is the struct gpio..._chip_config(9) page from the Kernel API Manual, and the star of the show is struct gpio_generic_chip_config β literally the Generic GPIO chip configuration data bestie π
π SYNOPSIS π
struct gpio_generic_chip_config {
struct device *dev;
unsigned long sz;
void __iomem *dat;
void __iomem *set;
void __iomem *clr;
void __iomem *dirout;
void __iomem *dirin;
unsigned long flags;
};
π Members π
okay bestie, here's the member-by-member vibe check β every field, no skips, no cap β¨
devβ the parent device of the new GPIO chip. This one is compulsory β like, mandatory mandatory πszβ the size (width) of the MMIO registers in bytes, typically1,2, or4πdatβ the MMIO address for the register to READ the value of the GPIO lines. The expectation is that a1in the corresponding bit in this register means the line is asserted πsetβ the MMIO address for the register to SET the value of the GPIO lines. The expectation is that we write the line with1in this register to drive the GPIO line high π₯clrβ the MMIO address for the register to CLEAR the value of the GPIO lines. The expectation is that we write the line with1in this register to drive the GPIO line low. It is allowed to leave this address asNULLβ in that case thesetregister will be assumed to also clear the GPIO lines, by actively writing the line with0πdiroutβ the MMIO address for the register to set the line as OUTPUT. It is assumed that setting a line to1in this register will turn that line into an output line. Conversely, setting the line to0will turn that line into an input π¦dirinβ the MMIO address for the register to set this line as INPUT. It is assumed that setting a line to1in this register will turn that line into an input line. Conversely, setting the line to0will turn that line into an output πflagsβ different flags that will affect the behaviour of the device, such as endianness etc. π«Ά
π¦ SEE ALSO π¦
- Kernel file
./include/linux/gpio/generic.hstruct gpio_generic_chip(9) gpio_generic_chip_set(9)gpio_generic_read_reg(9)gpio_generic_write_reg(9)
and that's the whole page, bestie π this cutie comes from the ./include/linux/gpio source/version, dated October 2026 β mwah, periodt πβ¨
π¦ 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