STRUCT CDNS_SPI(9)
πβ¨ struct cdns_spi(9) β Kernel API Manual β¨π
okay bestie, this is the struct cdns_spi(9) page from the Kernel API Manual, section 9, and it is literally the whole tea on the SPI driver instance π
no cap.
πΈ NAME πΈ
struct cdns_spi β this definition defines the spi driver instance. Itβs giving βthe struct that holds the driverβs whole situation,β periodt. π«Ά
π¦ SYNOPSIS π¦
struct cdns_spi {
void __iomem *regs;
struct clk *ref_clk;
struct clk *pclk;
unsigned int clk_rate;
u32 speed_hz;
const void *txbuf;
void *rxbuf;
int tx_bytes;
int rx_bytes;
u8 n_bytes;
u8 dev_busy;
u32 is_decoded_cs;
unsigned int tx_fifo_depth;
struct reset_control *rstc;
};
π Members π
okay so hereβs the member-by-member breakdown, bestie β every single one, no skipping, fr fr:
regsβ virtual address of the SPI controller registers.ref_clkβ pointer to the peripheral clock.pclkβ pointer to the APB clock.clk_rateβ reference clock frequency, taken fromref_clk.speed_hzβ current SPI bus clock speed in Hz.txbufβ pointer to the TX buffer.rxbufβ pointer to the RX buffer.tx_bytesβ number of bytes left to transfer.rx_bytesβ number of bytes requested.n_bytesβ number of bytes per word.dev_busyβ device busy flag.is_decoded_csβ flag for decoder property set or not.tx_fifo_depthβ depth of the TX FIFO.rstcβ optional reset control for SPI controller.
π SEE ALSO π
Kernel file ./drivers/spi/spi-cadence.c, plus all these iconic functions: cdns_spi_init_hw(9), cdns_spi_chipselect(9), cdns_spi_config_clock_mode(9), cdns_spi_config_clock_freq(9), cdns_spi_setup_transfer(9), cdns_spi_process_fifo(9), cdns_spi_irq(9), cdns_transfer_one(9), cdns_prepare_transfer_hardware(9), cdns_unprepare_transfer_hardware(9), cdns_spi_detect_fifo_depth(9), cdns_target_abort(9), cdns_spi_probe(9), cdns_spi_remove(9), cdns_spi_suspend(9), cdns_spi_resume(9), cdns_spi_runtime_resume(9), cdns_spi_runtime_suspend(9). Go read them if you want the full lore, iykyk π.
okay thatβs the whole page, mwah π β source/version is ./drivers/spi, date is October 2026, and itβs all for struct cdns_spi(9). slay β¨
π¦ 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