STRUCT SPEAR_SPICS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct spear_spics(9)

okay bestie, buckle up β€” this is a page from the Kernel API Manual and it's all about one little struct. ngl it's giving "niche but iconic" ✨


✨ NAME ✨

struct spear_spics β€” the struct that literally represents spi chip select control πŸŽ€ no cap, that's the whole vibe.


🌸 SYNOPSIS 🌸

here's the whole thing, copied exactly so you can't mess it up:

struct spear_spics {
    void __iomem            *base;
    u32 perip_cfg;
    u32 sw_enable_bit;
    u32 cs_value_bit;
    u32 cs_enable_mask;
    u32 cs_enable_shift;
    unsigned long           use_count;
    int last_off;
    struct gpio_chip        chip;
 };

πŸ¦‹ Members πŸ¦‹

okay so let's go through every single one of these, because each field is a main character in its own right πŸ’œ

  • base β€” base address. that's it, that's the field. the address where it all begins 🫢
  • perip_cfg β€” configuration register. the vibe-setting register, if you will ✨
  • sw_enable_bit β€” the bit to enable s/w control over chipselects. so like, the little switch that hands chipselect duty over to software πŸ‘‘
  • cs_value_bit β€” the bit to program high or low chipselect. high or low, pick your fighter πŸ’…
  • cs_enable_mask β€” mask to select bits required to select chipselect. it's masking. it's selecting. it's doing the most πŸŽ€
  • cs_enable_shift β€” bit pos of cs_enable_mask. literally just the position, bestie, someone has to keep track 🌸
  • use_count β€” use count of a spi controller cs lines. counting the uses, one at a time, no drama πŸ”₯
  • last_off β€” stores last offset caller of set_value. a little memory of who called last, so nostalgic 😭
  • chip β€” gpio_chip abstraction. the whole GPIO vibe, abstracted πŸ¦‹

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/gpio/gpio-spear-spics.c β€” go read it, bestie, it's right there πŸ“–

fr fr go look at that source file, the struct doesn't explain itself and this page isn't gonna do it for you either πŸ’€

and that's a wrap, bestie 🧚 this was the struct spear_spics(9) page, straight out of ./drivers/gpio, dated October 2026 β€” slay, periodt, see you in the next manpage πŸ’–πŸŒŸ

πŸ“¦ where this page comes from