spi_controller_xfer_timeout(9)
β¨ spi_controller_xfer_timeout(9) β¨
okay bestie, welcome to the spi_controller_xfer_timeout page from the Kernel API Manual β yes that's the same manual name as the function, iconic of it honestly π
πΈ NAME πΈ
spi_controller_xfer_timeout β literally just compute a suitable timeout value π
β¨ SYNOPSIS β¨
unsigned int spi_controller_xfer_timeout (struct spi_controller *ctlr ,
struct spi_transfer *xfer );
like, it takes two things and hands you back an unsigned int, no cap π«Ά
π¦ ARGUMENTS π¦
ctlrβ the SPI device (yes, described as a device right there in the original, keep that energy)xferβ the transfer descriptor β the little guy describing the transfer you're stressing about
π DESCRIPTION π
okay so here's the vibe: this function computes a relevant timeout value for the given transfer. periodt.
the way it does it?? we derive the time that it would take on a single data line, and then we take twice this amount of time β with a minimum of 500ms β to avoid false positives on loaded systems. π like, we're not out here timing out on a busy machine, that's not the mood.
ngl the "minimum of 500ms" bit is the whole personality of this function. slow and steady, bestie. π§
β RETURN β
it returns the transfer timeout value in milliseconds β that's it, that's the gift π
π₯ SEE ALSO π₯
kernel file ./include/linux/spi/spi.h (iykyk), plus the whole friend group:
struct spi_statistics(9)struct spi_delay(9)struct spi_device(9)struct spi_driver(9)spi_unregister_driver(9)module_spi_driver(9)struct spi_controller(9)struct spi_res(9)struct spi_transfer(9)struct spi_message(9)spi_message_init_with_transfers(9)spi_is_bpw_supported(9)spi_bpw_to_bytes(9)struct spi_replaced_transfers(9)spi_sync_transfer(9)spi_write(9)spi_read(9)spi_w8r8(9)spi_w8r16(9)spi_w8r16be(9)struct spi_board_info(9)
and that's the whole page, bestie, you ate that π β¨
sign-off cuteness: this one lives in ./include/linux/spi and it's dated October 2026 β go off, future kernel docs ππ¦π
π¦ 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