STRUCT SPI_MUX_PRIV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ 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 int energy πŸ”₯
  • 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 the spi_device pointer to the child. knowing whose child it is at all times, very responsible of it honestly πŸ’€
  • mux β€” mux_control structure 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