STRUCT CDNS_SPI(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’–βœ¨ 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 from ref_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