Lines Matching defs:mstate
388 * @mstate: The mux-state to select.
404 int mux_state_select_delay(struct mux_state *mstate, unsigned int delay_us)
406 return mux_control_select_delay(mstate->mux, mstate->state, delay_us);
447 * @mstate: The mux-state to select.
460 int mux_state_try_select_delay(struct mux_state *mstate, unsigned int delay_us)
462 return mux_control_try_select_delay(mstate->mux, mstate->state, delay_us);
494 * @mstate: The mux-state to deselect.
504 int mux_state_deselect(struct mux_state *mstate)
506 return mux_control_deselect(mstate->mux);
683 struct mux_state *mstate;
685 mstate = kzalloc(sizeof(*mstate), GFP_KERNEL);
686 if (!mstate)
689 mstate->mux = mux_get(dev, mux_name, &mstate->state);
690 if (IS_ERR(mstate->mux)) {
691 int err = PTR_ERR(mstate->mux);
693 kfree(mstate);
697 return mstate;
702 * @mstate: The mux-state to put away.
706 static void mux_state_put(struct mux_state *mstate)
708 mux_control_put(mstate->mux);
709 kfree(mstate);
714 struct mux_state *mstate = *(struct mux_state **)res;
716 mux_state_put(mstate);
730 struct mux_state **ptr, *mstate;
736 mstate = mux_state_get(dev, mux_name);
737 if (IS_ERR(mstate)) {
739 return mstate;
742 *ptr = mstate;
745 return mstate;