STRUCT SYSCON_GPIO_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct syscon_gpio_data(9) β€” the kernel API manual, but make it cute πŸŽ€

okay bestie, pull up a chair because we're diving into struct syscon_gpio_data(9) β€” yes that's the manual page name AND the whole vibe. This little icon is literally the Configuration for the device, and the way it just sits there holding all the syscon GPIO settings? main character energy fr fr. 🌈


✨ NAME ✨

struct syscon_gpio_data β€” Configuration for the device. that's it, that's the tweet 🐦


🌸 SYNOPSIS 🌸

struct syscon_gpio_data {
    unsigned int    flags;
    unsigned int    bit_count;
    unsigned int    dat_bit_offset;
    unsigned int    dir_bit_offset;
    int (*set)(struct gpio_chip *chip, unsigned int offset, int value);
 };

like, look at her. five members. not one more, not one less. iconic. πŸ‘‘


πŸ¦‹ Members πŸ¦‹

get ready, we're doing a member-by-member vibe check πŸ’…

  • flags β€” the set of GPIO_SYSCON_FEAT_ flags, and there are three of them bestie:
    • GPIO_SYSCON_FEAT_IN: the GPIOs support input 🫢
    • GPIO_SYSCON_FEAT_OUT: the GPIOs support output ✨
    • GPIO_SYSCON_FEAT_DIR: the GPIOs support switching direction πŸ”₯
  • bit_count β€” the number of bits used as GPIOs. literally just a count, no drama.
  • dat_bit_offset β€” the offset (in bits) to the first GPIO bit. think of it as the lil runway before the data starts πŸ›«
  • dir_bit_offset β€” an optional offset (in bits) to the first bit you use to switch GPIO direction. note the "optional" β€” and it's used with the GPIO_SYSCON_FEAT_DIR flag, so don't be out here using it on its own, iykyk πŸ™ˆ
  • set β€” the hardware-specific callback that assigns the output value for the signal "offset". hw specific!! so it's giving ✨specialized✨
ngl, no dangerous or deprecated stuff on this page β€” she's a clean, well-behaved struct. slay. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/gpio/gpio-syscon.c β€” go read it, that's where the real lore lives πŸ“–

and that's the whole page, bestie! no cap, you ate that. πŸ“

source/version: ./drivers/gpio Β· dated October 2026 Β· struct syscon_gpio_data(9) πŸ’œ β€” mwah, go forth and GPIO πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from