Lines Matching full:mux
3 * mux/driver.h - definitions for the multiplexer driver interface
13 #include <dt-bindings/mux/mux.h>
22 * struct mux_control_ops - Mux controller operations for a mux chip.
23 * @set: Set the state of the given mux controller.
26 int (*set)(struct mux_control *mux, int state);
30 * struct mux_control - Represents a mux controller.
31 * @lock: Protects the mux controller state.
32 * @chip: The mux chip that is handling this mux controller.
33 * @cached_state: The current mux controller state, or -1 if none.
34 * @states: The number of mux controller states.
35 * @idle_state: The mux controller state to use when inactive, or one
39 * Mux drivers may only change @states and @idle_state, and may only do so
40 * between allocation and registration of the mux controller. Specifically,
41 * @cached_state is internal to the mux core and should never be written by
42 * mux drivers.
45 struct semaphore lock; /* protects the state of the mux */
57 * struct mux_chip - Represents a chip holding mux controllers.
58 * @controllers: Number of mux controllers handled by the chip.
59 * @mux: Array of mux controllers that are handled.
62 * @ops: Mux controller operations.
66 struct mux_control *mux; member
77 * @mux_chip: The mux-chip to get the private memory from.
83 return &mux_chip->mux[mux_chip->controllers]; in mux_chip_priv()
98 * mux_control_get_index() - Get the index of the given mux controller
99 * @mux: The mux-control to get the index for.
101 * Return: The index of the mux controller within the mux chip the mux
104 static inline unsigned int mux_control_get_index(struct mux_control *mux) in mux_control_get_index() argument
106 return mux - mux->chip->mux; in mux_control_get_index()