ax_spi_detect_fifo_depth(9)
π ax_spi_detect_fifo_depth β bestie, let's find out how deep this FIFO goes π
Okay so this one is from the Kernel API Manual (section 9, the kernel-functions one, iykyk), and honestly? It's giving "small but mighty". Let's get into it β¨
πΈ NAME πΈ
ax_spi_detect_fifo_depth β literally just detects the FIFO depth of the hardware. That's the whole vibe. No cap π«Ά
π¦ SYNOPSIS π¦
void ax_spi_detect_fifo_depth (struct ax_spi *xspi );
π ARGUMENTS π
xspiβ a pointer to theax_spistructure. That's it, that's the whole guest list π
β¨ DESCRIPTION β¨
So here's the tea β β the depth of the TX FIFO is a synthesis configuration parameter of the SPI IP. Translation: it's baked in at synthesis time, not something you can just peek at from a register like "hi bestie what's your size".
But!! The FIFO threshold register is sized so that its maximum value can be the FIFO size - 1. That's the loophole π₯ And that's literally what gets used to detect the size of the FIFO. Clever, right? The register's ceiling is basically a little breadcrumb trail back to the real answer. Obsessed honestly π
π SEE ALSO π
Kernel file ./drivers/spi/spi-axiado.c, plus the whole friend group:
ax_spi_read(9)ax_spi_write(9)ax_spi_write_b(9)ax_spi_init_hw(9)ax_spi_chipselect(9)ax_spi_config_clock_mode(9)ax_spi_config_clock_freq(9)ax_spi_setup_transfer(9)ax_spi_fill_tx_fifo(9)ax_spi_get_rx_byte_for_irq(9)ax_spi_process_rx_and_finalize(9)ax_spi_irq(9)ax_transfer_one(9)ax_prepare_transfer_hardware(9)ax_unprepare_transfer_hardware(9)ax_spi_get_rx_byte(9)ax_spi_probe(9)ax_spi_remove(9)ax_spi_suspend(9)ax_spi_resume(9)ax_spi_runtime_resume(9)ax_spi_runtime_suspend(9)
That's the whole page bestie β go forth and detect some FIFO depths πβ¨
This iconic little entry lives in ./drivers/spi and is dated October 2026, per the footer of the original page. Mwah, bye! ππ§
π¦ 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