STRUCT SPEAR_SPICS(9)
π 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 ofcs_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 ofset_value. a little memory of who called last, so nostalgic πchipβgpio_chipabstraction. 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
- 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