mux_state
omap->mux_state = devm_mux_state_get_optional_selected(&pdev->dev, NULL);
if (IS_ERR(omap->mux_state)) {
r = PTR_ERR(omap->mux_state);
if (omap->mux_state)
mux_state_deselect(omap->mux_state);
struct mux_state *mux_state;
int mux_state; // 0..2 - MuxSyncWord, 3 - nMuxPacks, 4 - muxpack
ttusb->mux_state = 0;
switch (ttusb->mux_state) {
++ttusb->mux_state;
ttusb->mux_state = 0;
++ttusb->mux_state;
ttusb->mux_state = 0;
ttusb->mux_state = 0;
ttusb->mux_state = 0;
struct mux_state *mux_state;
mux_state = devm_mux_state_get_optional_selected(&pdev->dev, NULL);
if (IS_ERR(mux_state))
return PTR_ERR(mux_state);
int mux_state_select_delay(struct mux_state *mstate, unsigned int delay_us)
int mux_state_try_select_delay(struct mux_state *mstate, unsigned int delay_us)
int mux_state_deselect(struct mux_state *mstate)
struct mux_state *mstate;
int (*exit)(struct mux_state *mstate);
static struct mux_state *
struct mux_state *mstate;
static void mux_state_put(struct mux_state *mstate)
static struct mux_state *__devm_mux_state_get(struct device *dev, const char *mux_name,
int (*init)(struct mux_state *mstate),
int (*exit)(struct mux_state *mstate))
struct mux_state *mstate;
struct mux_state *
struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name)
struct mux_state *devm_mux_state_get_selected(struct device *dev, const char *mux_name)
struct mux_state *devm_mux_state_get_optional_selected(struct device *dev,
enum mux_state state;
struct mux_state *mux_state;
mux_state = devm_mux_state_get_optional(dev, NULL);
if (IS_ERR(mux_state))
return PTR_ERR(mux_state);
priv->mux_state = mux_state;
struct mux_state *mux_state;
if (priv->mux_state) {
ret = mux_state_select(priv->mux_state);
if (priv->mux_state)
mux_state_deselect(priv->mux_state);
mux_state = devm_mux_state_get_optional_selected(dev, NULL);
if (IS_ERR(mux_state))
return dev_err_probe(dev, PTR_ERR(mux_state), "Failed to get USB mux\n");
struct mux_state *mux_state;
mux_state_deselect(func->mux_state);
struct mux_state *mux_state;
function->mux_state = devm_mux_state_get_from_np(pctldev->dev, NULL, np_config);
if (IS_ERR(function->mux_state))
return PTR_ERR(function->mux_state);
ret = mux_state_select(func->mux_state);
u8 mux_state;
mux_state = (u8)ret;
ret = cros_typec_cmd_mux_set(sdata, port_num, index, mux_state);
index, mux_state);
struct typec_mux_state mux_state;
mux_state.alt = state->alt;
mux_state.data = state->data;
mux_state.mode = state->mode;
return typec_mux_set(nb7->typec_mux, &mux_state);
struct typec_mux_state mux_state;
mux_state.alt = state->alt;
mux_state.data = state->data;
mux_state.mode = state->mode;
return typec_mux_set(retimer->typec_mux, &mux_state);
struct typec_mux_state mux_state;
mux_state.alt = state->alt;
mux_state.data = state->data;
mux_state.mode = state->mode;
return typec_mux_set(ptn->typec_mux, &mux_state);
static inline int __must_check mux_state_select(struct mux_state *mstate)
static inline int __must_check mux_state_try_select(struct mux_state *mstate)
static inline int mux_state_deselect(struct mux_state *mstate)
static inline struct mux_state *devm_mux_state_get(struct device *dev, const char *mux_name)
static inline struct mux_state *devm_mux_state_get_optional(struct device *dev,
static inline struct mux_state *devm_mux_state_get_selected(struct device *dev,
static inline struct mux_state *devm_mux_state_get_optional_selected(struct device *dev,
struct mux_state;
int __must_check mux_state_select_delay(struct mux_state *mstate,
int __must_check mux_state_try_select_delay(struct mux_state *mstate,
static inline int __must_check mux_state_select(struct mux_state *mstate)
static inline int __must_check mux_state_try_select(struct mux_state *mstate)
int mux_state_deselect(struct mux_state *mstate);
struct mux_state *
struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name);
struct mux_state *devm_mux_state_get_selected(struct device *dev, const char *mux_name);
struct mux_state *devm_mux_state_get_optional_selected(struct device *dev, const char *mux_name);
static inline int __must_check mux_state_select_delay(struct mux_state *mstate,
static inline int __must_check mux_state_try_select_delay(struct mux_state *mstate,
uint8_t mux_state; /* USB_PD_MUX* - encoded mux state */
struct kcm_proc_mux_state *mux_state;
mux_state = seq->private;
mux_state->idx = 0;
kcm_format_mux(v, mux_state->idx, seq);
mux_state->idx++;
unsigned int mux_state;
ret = mux_control_try_select(wcd938x->us_euro_mux, !wcd938x->mux_state);
gpiod_set_value(wcd938x->us_euro_gpio, !wcd938x->mux_state);
wcd938x->mux_state = !wcd938x->mux_state;
ret = mux_control_try_select(wcd938x->us_euro_mux, wcd938x->mux_state);