winbond_nor_select_die(9)
π winbond_nor_select_die β the "pick your die" era π
Okay bestie, this is a kernel API manual page for winbond_nor_select_die(9) β yes, manual section 9, the kernel API one. Come sit with me, we're gonna get into it. β¨
πΈ SYNOPSIS πΈ
int winbond_nor_select_die(struct spi_nor *nor, u8 die);
That's the whole signature, no cap. Let's unpack the two little guys it takes.
π ARGUMENTS π
norβ pointer tostruct spi_nor. This is your main character struct, the one holding all the SPI NOR situation. π«Άdieβ the die to set active. It's au8, and it's literally the whole point of the function. Slay.
π¦ DESCRIPTION π¦
So here's the vibe: certain Winbond chips feature more than a single die. Like, more than one die. Multiple. A whole squad of dies. π
And mostly? This is hidden to the user. You don't see it, you don't touch it, it's giving invisible backstage crew. But the plot twist is that some chips may experience time deviation when modifying the status bits between dies β and in some corner cases, that may produce problematic races. Races!! On your kernel!! Literally not the fun kind. π
So being able to explicitly select a die to check its state in this case may be useful. That's it. That's the function. You pick the die, you vibe check it, you move on. Iconic behaviour, honestly.
Lowkey important: that "problematic races" thing is a real caveat, not a cute metaphor. Time deviation between dies while poking status bits is the whole reason this exists. Respect the corner cases fr fr.
β RETURN β
0on success β the good ending. π-errnootherwise β the classic kernel bad-ending, returned the proper errno way.
π₯ SEE ALSO π₯
- Kernel file
./drivers/mtd/spi-nor/winbond.cβ the actual source, go read it, it's giving lore winbond_nor_write_ear(9)β the EAR-writing siblingwinbond_nor_set_4byte_addr_mode(9)β the 4-byte address mode one, also part of the family π
And that's the page! Header said winbond_nor_select_die(9) / Kernel API Manual β folded in up top, as promised. The footer said it lives under ./drivers/mtd/spi-nor, dated October 2026, and it's the winbond_nor_select_die(9) page all the way through. Catch you in the kernel, bestie β go select a die responsibly π§ββοΈπΈβ¨
π¦ 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