STRUCT ATCSPI_DEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so welcome to struct atcspi_dev(9), straight out of the Kernel API Manual β€” this page is all about the Andes ATCSPI200 SPI controller’s private data, and it’s lowkey main-character energy πŸŒˆπŸ’…

🌸 NAME 🌸

struct atcspi_dev is the private data struct for the Andes ATCSPI200 SPI controller. That’s the whole NAME vibe, bestie β€” concise, iconic, periodt ✨

✨ SYNOPSIS ✨

here’s the exact struct shape, and yes every field is here β€” copy it character for character, no cap πŸŽ€:

       struct atcspi_dev {
           struct spi_controller   *host;
           struct mutex            mutex_lock;
           struct completion       dma_completion;
           struct device           *dev;
           struct regmap           *regmap;
           struct clk              *clk;
           dma_addr_t dma_addr;
           unsigned int            clk_rate;
           unsigned int            sclk_rate;
           unsigned int            txfifo_size;
           unsigned int            rxfifo_size;
           bool data_merge;
           bool use_dma;
        };

🫢 Members 🫢

okay bestie, these are the members, and every single one is doing its job β€” let’s go down the list πŸ¦‹:

  • host β€” pointer to the SPI controller structure. That’s the controller hookup, iykyk πŸ”—
  • mutex_lock β€” a mutex to protect concurrent access to the controller. Literally the bouncer for the controller πŸšͺπŸ’…
  • dma_completion β€” a completion to signal the end of a DMA transfer. DMA done? this completion says so βœ…
  • dev β€” pointer to the device structure. 🫢
  • regmap β€” register map for accessing controller registers. map it out, bestie πŸ—ΊοΈ
  • clk β€” pointer to the controller’s functional clock. functional clock said hi ⏰
  • dma_addr β€” the physical address of the SPI data register for DMA. physical address, very official 🏠
  • clk_rate β€” the cached frequency of the functional clock. cached frequency, cute 🌊
  • sclk_rate β€” the target frequency for the SPI clock (SCLK). target frequency, go off 🎯
  • txfifo_size β€” the size of the transmit FIFO in bytes. transmit FIFO bytes, noted πŸ“€
  • rxfifo_size β€” the size of the receive FIFO in bytes. receive FIFO bytes, also noted πŸ“₯
  • data_merge β€” a flag indicating if the data merge mode is enabled for the current transfer. merge mode flag for the current transfer πŸ”€
  • use_dma β€” enable DMA mode if ATCSPI_DMA_SUPPORT is set and DMA is successfully configured. DMA mode gets enabled when that support is set and DMA is successfully configured πŸš€

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/spi/spi-atcspi200.c β€” that’s the reference, bestie, go look if you’re curious πŸ‘€βœ¨

source/version ./drivers/spi, dated October 2026, for struct atcspi_dev(9) β€” big slay sign-off, mwah πŸ«ΆπŸŽ€πŸ’œ

πŸ“¦ where this page comes from