STRUCT ATCSPI_DEV(9)
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 ifATCSPI_DMA_SUPPORTis 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
- 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