Lines Matching defs:mux
15 /* See mux.h for background documentation. */
20 * struct mux_chip - Represents a chip holding mux controllers.
21 * @controllers: Number of mux controllers handled by the chip.
22 * @mux: Array of mux controllers that are handled.
28 struct mux_control *mux;
32 * struct mux_control_ops - Mux controller operations for a mux chip.
33 * @set: Set the state of the given mux controller.
39 * @mux: A multiplexer control
42 int (*set)(struct mux_control *mux, int state);
49 * use a default implementation, which assumes #mux-control-cells = <1>
64 * struct mux_control - Represents a mux controller.
65 * @in_use: Whether the mux controller is in use or not.
67 * @cached_state: The current mux controller state, or -1 if none.
68 * @states: The number of mux controller states.
69 * @idle_state: The mux controller state to use when inactive, or one
71 * @id: The index of the mux controller within the mux chip
75 * between allocation and registration of the mux controller. Specifically,
76 * @cached_state is internal to the mux core and should never be written by
77 * mux drivers.
89 * mux_control_get_index() - Get the index of the given mux controller
90 * @mux: The mux-control to get the index for.
92 * Return: The index of the mux controller within the mux chip the mux
95 static inline unsigned int mux_control_get_index(struct mux_control *mux)
97 return mux->id;
101 * mux_alloc_controllers() - Allocate the given number of mux controllers.