Lines Matching defs:mux

19  * struct i2c_mux: Information the uclass stores about an I2C mux
21 * @selected: Currently selected mux, or -1 for none
30 * struct i2c_mux_bus: Information about each bus the mux controls
38 /* Find out the mux channel number */
52 /* Find the I2C buses selected by this mux */
53 static int i2c_mux_post_bind(struct udevice *mux)
58 debug("%s: %s\n", __func__, mux->name);
63 dev_for_each_subnode(node, mux) {
73 parent_name_len = strlen(mux->parent->name);
75 mux_name_len = strlen(mux->name);
84 strcat(full_name, mux->parent->name);
86 strcat(full_name, mux->name);
90 ret = device_bind_driver_to_node(mux, "i2c_mux_bus_drv",
101 /* Set up the mux ready for use */
102 static int i2c_mux_post_probe(struct udevice *mux)
104 struct i2c_mux *priv = dev_get_uclass_priv(mux);
107 debug("%s: %s\n", __func__, mux->name);
113 if (UCLASS_I2C == device_get_uclass_id(mux->parent)) {
114 priv->i2c_bus = dev_get_parent(mux);
120 ret = uclass_get_device_by_phandle(UCLASS_I2C, mux, "i2c-parent",
132 struct udevice *mux = dev->parent;
133 struct i2c_mux_ops *ops = i2c_mux_get_ops(mux);
138 return ops->select(mux, dev, plat->channel);
144 struct udevice *mux = dev->parent;
145 struct i2c_mux_ops *ops = i2c_mux_get_ops(mux);
150 return ops->deselect(mux, dev, plat->channel);
155 struct udevice *mux = dev->parent;
156 struct i2c_mux *priv = dev_get_uclass_priv(mux);
171 struct udevice *mux = dev->parent;
172 struct i2c_mux *priv = dev_get_uclass_priv(mux);
191 struct udevice *mux = dev->parent;
192 struct i2c_mux *priv = dev_get_uclass_priv(mux);