Lines Matching full:mux
11 #include <linux/i2c-mux.h>
13 #include <linux/mux/consumer.h>
17 struct mux { struct
25 struct mux *mux = i2c_mux_priv(muxc); in i2c_mux_select() argument
28 ret = mux_control_select(mux->control, chan); in i2c_mux_select()
29 mux->do_not_deselect = ret < 0; in i2c_mux_select()
36 struct mux *mux = i2c_mux_priv(muxc); in i2c_mux_deselect() local
38 if (mux->do_not_deselect) in i2c_mux_deselect()
41 return mux_control_deselect(mux->control); in i2c_mux_deselect()
64 { .compatible = "i2c-mux", },
75 struct mux *mux; in i2c_mux_probe() local
83 mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL); in i2c_mux_probe()
84 if (!mux) in i2c_mux_probe()
87 mux->control = devm_mux_control_get(dev, NULL); in i2c_mux_probe()
88 if (IS_ERR(mux->control)) in i2c_mux_probe()
89 return dev_err_probe(dev, PTR_ERR(mux->control), in i2c_mux_probe()
90 "failed to get control-mux\n"); in i2c_mux_probe()
105 muxc->priv = mux; in i2c_mux_probe()
109 muxc->mux_locked = of_property_read_bool(np, "mux-locked"); in i2c_mux_probe()
121 if (chan >= mux_control_states(mux->control)) { in i2c_mux_probe()
132 dev_info(dev, "%d-port mux on %s adapter\n", children, parent->name); in i2c_mux_probe()
159 .name = "i2c-mux-gpmux",