Lines Matching refs:state

25  * The idle-as-is "state" is not an actual state that may be selected, it
26 * only implies that the state should not be changed. So, use that state
27 * as indication that the cached state of the multiplexer is unknown.
72 * the desired idle state in the returned mux_chip->mux[N].idle_state members.
73 * The default idle state is MUX_IDLE_AS_IS. The mux driver also needs to
127 static int mux_control_set(struct mux_control *mux, int state)
129 int ret = mux->chip->ops->set(mux, state);
131 mux->cached_state = ret < 0 ? MUX_CACHE_UNKNOWN : state;
160 dev_err(&mux_chip->dev, "unable to set idle state\n");
296 static int __mux_control_select(struct mux_control *mux, int state)
300 if (WARN_ON(state < 0 || state >= mux->states))
303 if (mux->cached_state == state)
306 ret = mux_control_set(mux, state);
318 * mux_control_select() - Select the given multiplexer state.
319 * @mux: The mux-control to request a change of state from.
320 * @state: The new requested state.
322 * On successfully selecting the mux-control state, it will be locked until
331 * Return: 0 when the mux-control state has the requested state or a negative
334 int mux_control_select(struct mux_control *mux, unsigned int state)
342 ret = __mux_control_select(mux, state);
352 * mux_control_try_select() - Try to select the given multiplexer state.
353 * @mux: The mux-control to request a change of state from.
354 * @state: The new requested state.
356 * On successfully selecting the mux-control state, it will be locked until
363 * Return: 0 when the mux-control state has the requested state or a negative
366 int mux_control_try_select(struct mux_control *mux, unsigned int state)
373 ret = __mux_control_select(mux, state);
383 * mux_control_deselect() - Deselect the previously selected multiplexer state.
391 * occur if the mux has an idle state. Note that even if an error occurs, the