spi_mem_poll_status(9)
β¨ spi_mem_poll_status(9) β¨
okay so this is a page straight out of the Kernel API Manual, and it's giving "waiting for your friend to text back but make it silicon" π buckle up bestie, we're polling a status register.
πΈ NAME πΈ
spi_mem_poll_status β poll memory device status. that's it, that's the whole vibe. it checks on your memory device until it's ready or until it gives up π
π SYNOPSIS π
int spi_mem_poll_status (struct spi_mem *mem , const struct spi_mem_op
*op , u16 mask , u16 match , unsigned long initial_delay_us , unsigned
long polling_delay_us , u16 timeout_ms );
like, seven arguments. seven. she's high-maintenance and we respect it π
π¦ ARGUMENTS π¦
memβ the SPI memory device itself. the main character fr.opβ the memory operation to execute. the whole reason we're here.maskβ status bitmask tockeck(yes,ckeck, that's literally how it's spelled in here, we love a typo, no notes π). it's the bits you care about.matchβ the(status & mask)expected value. the answer you're waiting for πinitial_delay_usβ delay in us before starting to poll. a little beauty rest first, iconic.polling_delay_usβ time to sleep between reads in us. the nap between check-ins π΄timeout_msβ timeout in milliseconds. the point where we simply stop waiting, bestie β°
π DESCRIPTION π
This function polls a status register and returns when (status & mask) == match or when the timeout has expired. that's the whole plot: keep peeking at the status register, and the second the masked bits match what you expected β you're done, slay π If the timeout runs out first, it also returns. no infinite loops, periodt.
π₯ RETURN π₯
0in case of success β ate, no crumbs π-ETIMEDOUTin case of error β the timeout expired, we waited too long, tragic π-EOPNOTSUPPif not supported β this device said "not today", don't take it personally
π SEE ALSO π
Kernel file ./drivers/spi/spi-mem.c
spi_controller_dma_map_mem_op_data(9)spi_controller_dma_unmap_mem_op_data(9)spi_mem_supports_op(9)spi_mem_exec_op(9)spi_mem_get_name(9)spi_mem_set_dqs(9)spi_mem_has_dqs(9)spi_mem_adjust_op_size(9)spi_mem_adjust_op_freq(9)spi_mem_calc_op_duration(9)spi_mem_dirmap_create(9)spi_mem_dirmap_destroy(9)devm_spi_mem_dirmap_create(9)devm_spi_mem_dirmap_destroy(9)spi_mem_dirmap_read(9)spi_mem_dirmap_write(9)spi_mem_driver_register_with_owner(9)spi_mem_driver_unregister(9)
like a whole friend group of SPI functions, and yes they all said hi π«Ά
okay that's the page!! this one lives in ./drivers/spi, dated October 2026, and it's titled spi_mem_poll_status(9) in case you forgot where you were π go poll something responsibly, ily, 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