STRUCT MUX_CONTROL(9)
β¨ NAME β¨
struct mux_control is from the Kernel API Manual (section 9, iykyk), and it literally represents a mux controller. Thatβs the whole main-character job. π
π» SYNOPSIS π»
okay so hereβs the struct in all its glory, character for character because we do not mess with code:
struct mux_control {
struct semaphore lock;
struct mux_chip *chip;
int cached_state;
unsigned int states;
int idle_state;
ktime_t last_change;
};
π§Έ Members π§Έ
lockβ protects the mux controller state. πchipβ the mux chip that is handling this mux controller. ποΈcached_stateβ the current mux controller state, or-1if none. π«§statesβ the number of mux controller states. π’idle_stateβ the mux controller state to use when inactive, or one ofMUX_IDLE_AS_ISandMUX_IDLE_DISCONNECT. π΄last_changeβ timestamp of last change. β°
π Description π
Real talk, bestie: mux drivers may only change states and idle_state, and they may only do that between allocation and registration of the mux controller. Thatβs the whole window. πͺ
Specifically, cached_state is internal to the mux core and should never be written by mux drivers β periodt. π«
π SEE ALSO π
Kernel file ./include/linux/mux/driver.h β plus these icons: struct mux_control_ops(9), struct mux_chip(9), mux_chip_priv(9), and mux_control_get_index(9). Go read them if youβre obsessed with mux lore. π
k bye bestie π
β source/version ./include/linux/mux, October 2026. 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