STRUCT SPI_MUX_PRIV(9)
π struct spi_mux_priv(9) π
okay bestie, welcome to the Kernel API Manual, specifically the page for struct spi_mux_priv(9) β yes it's a whole struct, yes it's giving main character energy, let's go π
β¨ NAME β¨
struct spi_mux_priv β the basic spi_mux structure, fr fr. that's the whole vibe. no cap.
π¦ SYNOPSIS π¦
struct spi_mux_priv {
struct spi_device *spi;
unsigned int current_cs;
void (*child_msg_complete)(void *context);
void *child_msg_context;
struct spi_device *child_msg_dev;
struct mux_control *mux;
};
literally copy that exactly, don't touch it, i'm watching π
πΈ Members πΈ
okay so here's the breakdown of every single field, and yes we're doing all of them π
spiβ pointer to the device struct attached to the parent spi controller. it's the parent's whole thing, you know? iconic.current_csβ the current chip select set in the mux. that's it, that's the field.unsigned intenergy π₯child_msg_completeβ The mux replaces the complete callback in the child's message to its own callback; this field is used by the driver to store the child's callback during a transfer. okay this one's kind of the plot twist β the mux is lowkey stealing the child's callback slot so it can sneak its own callback in there, and this field is where the driver holds onto the child's original callback for the duration of the transfer π«Άchild_msg_contextβ Used to store the child's context to the callback. keeping the receipts, periodt πchild_msg_devβ Used to store thespi_devicepointer to the child. knowing whose child it is at all times, very responsible of it honestly πmuxβmux_controlstructure used to provide chip selects for downstream spi devices. so like, the mux is out here handing out chip selects to all the downstream spi devices like friendship bracelets π
π SEE ALSO π
- Kernel file
./drivers/spi/spi-mux.c Driver description(9)
go read those too, iykyk π
ok that's the whole page!! every field, every pointer, every callback, all of it, accounted for β¨ ngl this struct is kinda small but it does So Much.
and that's a wrap bestie π§ from ./drivers/spi, dated October 2026, page struct spi_mux_priv(9) β slay, ate, no crumbs, 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