sdio_writeb_readb(9)
π sdio_writeb_readb(9) β the Kernel API Manual, bestie edition π
okay so real talk β you're in the Kernel API Manual, and the page you want is sdio_writeb_readb. that's the one. no cap, this is the whole vibe: write a byte, read it right back, all in one little request. β¨
πΈ NAME πΈ
sdio_writeb_readb β write and read a byte from SDIO function π¦
β¨ SYNOPSIS β¨
u8 sdio_writeb_readb (struct sdio_func *func , u8 write_byte , unsigned
int addr , int *err_ret );
like, that's the whole signature. iconic. keep it verbatim or it's not gonna compile, and we do NOT want that energy π
π ARGUMENTS π
funcβ the SDIO function you're accessing π that's your main character right there.write_byteβ the byte you're writing. literally just the byte. one (1) byte.addrβ the address you're writing to. πerr_retβ optional status value from the transfer. it's optional, but honestly bestie, you're gonna want it.
π«Ά DESCRIPTION π«Ά
so here's what's happening: this does a RAW (Read After Write) operation, exactly as defined by the SDIO spec π₯
a single byte gets written to the address space of a given SDIO function, and then the response gets read back from that same address β and the way that it does both of those is with a single request. one shot. ate. π
now for the not-so-slay part: if there's a problem with the operation,0xffis returned anderr_retwill contain the error code π so heads up,0xffis your "something went wrong" flag, not a real read. don't get caught out by that, iykyk.
π SEE ALSO π
the kernel file lives at ./drivers/mmc/core/sdio_io.c β go read it if you're feeling nerdy π§ and here's the whole friend group:
sdio_claim_host(9)sdio_release_host(9)sdio_enable_func(9)sdio_disable_func(9)sdio_set_block_size(9)sdio_align_size(9)sdio_readb(9)sdio_writeb(9)sdio_memcpy_fromio(9)sdio_memcpy_toio(9)sdio_readsb(9)sdio_writesb(9)sdio_readw(9)sdio_writew(9)sdio_readl(9)sdio_writel(9)sdio_f0_readb(9)sdio_f0_writeb(9)sdio_get_host_pm_caps(9)sdio_set_host_pm_flags(9)sdio_retune_crc_disable(9)sdio_retune_crc_enable(9)sdio_retune_hold_now(9)sdio_retune_release(9)
that's the page, bestie π this lil beauty comes to you from the Kernel API Manual, sourced out of ./drivers/mmc/core, and it's dated October 2026 β go forth and write-then-read responsibly, mwah πβ¨
π¦ 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