Home
last modified time | relevance | path

Searched refs:muxc (Results 1 – 25 of 30) sorted by relevance

12

/kernel/linux/linux-5.10/drivers/i2c/
Di2c-mux.c35 struct i2c_mux_core *muxc; member
43 struct i2c_mux_core *muxc = priv->muxc; in __i2c_mux_master_xfer() local
44 struct i2c_adapter *parent = muxc->parent; in __i2c_mux_master_xfer()
49 ret = muxc->select(muxc, priv->chan_id); in __i2c_mux_master_xfer()
52 if (muxc->deselect) in __i2c_mux_master_xfer()
53 muxc->deselect(muxc, priv->chan_id); in __i2c_mux_master_xfer()
62 struct i2c_mux_core *muxc = priv->muxc; in i2c_mux_master_xfer() local
63 struct i2c_adapter *parent = muxc->parent; in i2c_mux_master_xfer()
68 ret = muxc->select(muxc, priv->chan_id); in i2c_mux_master_xfer()
71 if (muxc->deselect) in i2c_mux_master_xfer()
[all …]
/kernel/linux/linux-5.10/drivers/i2c/muxes/
Di2c-mux-pinctrl.c22 static int i2c_mux_pinctrl_select(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_pinctrl_select() argument
24 struct i2c_mux_pinctrl *mux = i2c_mux_priv(muxc); in i2c_mux_pinctrl_select()
29 static int i2c_mux_pinctrl_deselect(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_pinctrl_deselect() argument
31 return i2c_mux_pinctrl_select(muxc, muxc->num_adapters); in i2c_mux_pinctrl_deselect()
77 struct i2c_mux_core *muxc; in i2c_mux_pinctrl_probe() local
95 muxc = i2c_mux_alloc(parent, dev, num_names, in i2c_mux_pinctrl_probe()
98 if (!muxc) { in i2c_mux_pinctrl_probe()
102 mux = i2c_mux_priv(muxc); in i2c_mux_pinctrl_probe()
104 platform_set_drvdata(pdev, muxc); in i2c_mux_pinctrl_probe()
137 muxc->deselect = i2c_mux_pinctrl_deselect; in i2c_mux_pinctrl_probe()
[all …]
Di2c-mux-mlxcpld.c104 static int mlxcpld_mux_select_chan(struct i2c_mux_core *muxc, u32 chan) in mlxcpld_mux_select_chan() argument
106 struct mlxcpld_mux *data = i2c_mux_priv(muxc); in mlxcpld_mux_select_chan()
113 err = mlxcpld_mux_reg_write(muxc->parent, client, regval); in mlxcpld_mux_select_chan()
120 static int mlxcpld_mux_deselect(struct i2c_mux_core *muxc, u32 chan) in mlxcpld_mux_deselect() argument
122 struct mlxcpld_mux *data = i2c_mux_priv(muxc); in mlxcpld_mux_deselect()
128 return mlxcpld_mux_reg_write(muxc->parent, client, data->last_chan); in mlxcpld_mux_deselect()
137 struct i2c_mux_core *muxc; in mlxcpld_mux_probe() local
148 muxc = i2c_mux_alloc(adap, &client->dev, CPLD_MUX_MAX_NCHANS, in mlxcpld_mux_probe()
151 if (!muxc) in mlxcpld_mux_probe()
154 data = i2c_mux_priv(muxc); in mlxcpld_mux_probe()
[all …]
Di2c-arb-gpio-challenge.c42 static int i2c_arbitrator_select(struct i2c_mux_core *muxc, u32 chan) in i2c_arbitrator_select() argument
44 const struct i2c_arbitrator_data *arb = i2c_mux_priv(muxc); in i2c_arbitrator_select()
76 dev_err(muxc->dev, "Could not claim bus, timeout\n"); in i2c_arbitrator_select()
85 static int i2c_arbitrator_deselect(struct i2c_mux_core *muxc, u32 chan) in i2c_arbitrator_deselect() argument
87 const struct i2c_arbitrator_data *arb = i2c_mux_priv(muxc); in i2c_arbitrator_deselect()
101 struct i2c_mux_core *muxc; in i2c_arbitrator_probe() local
116 muxc = i2c_mux_alloc(NULL, dev, 1, sizeof(*arb), I2C_MUX_ARBITRATOR, in i2c_arbitrator_probe()
118 if (!muxc) in i2c_arbitrator_probe()
120 arb = i2c_mux_priv(muxc); in i2c_arbitrator_probe()
122 platform_set_drvdata(pdev, muxc); in i2c_arbitrator_probe()
[all …]
Di2c-mux-gpmux.c23 static int i2c_mux_select(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_select() argument
25 struct mux *mux = i2c_mux_priv(muxc); in i2c_mux_select()
34 static int i2c_mux_deselect(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_deselect() argument
36 struct mux *mux = i2c_mux_priv(muxc); in i2c_mux_deselect()
74 struct i2c_mux_core *muxc; in i2c_mux_probe() local
99 muxc = i2c_mux_alloc(parent, dev, children, 0, 0, in i2c_mux_probe()
101 if (!muxc) { in i2c_mux_probe()
105 muxc->priv = mux; in i2c_mux_probe()
107 platform_set_drvdata(pdev, muxc); in i2c_mux_probe()
109 muxc->mux_locked = of_property_read_bool(np, "mux-locked"); in i2c_mux_probe()
[all …]
Di2c-mux-gpio.c34 static int i2c_mux_gpio_select(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_gpio_select() argument
36 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_select()
43 static int i2c_mux_gpio_deselect(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_gpio_deselect() argument
45 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_deselect()
109 struct i2c_mux_core *muxc; in i2c_mux_gpio_probe() local
140 muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, in i2c_mux_gpio_probe()
143 if (!muxc) { in i2c_mux_gpio_probe()
147 mux->gpios = muxc->priv; in i2c_mux_gpio_probe()
148 muxc->priv = mux; in i2c_mux_gpio_probe()
150 platform_set_drvdata(pdev, muxc); in i2c_mux_gpio_probe()
[all …]
Di2c-mux-pca954x.c234 static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan) in pca954x_select_chan() argument
236 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_select_chan()
244 ret = pca954x_reg_write(muxc->parent, client, regval); in pca954x_select_chan()
251 static int pca954x_deselect_mux(struct i2c_mux_core *muxc, u32 chan) in pca954x_deselect_mux() argument
253 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_deselect_mux()
260 return pca954x_select_chan(muxc, idle_state); in pca954x_deselect_mux()
265 return pca954x_reg_write(muxc->parent, client, in pca954x_deselect_mux()
279 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in idle_state_show() local
280 struct pca954x *data = i2c_mux_priv(muxc); in idle_state_show()
290 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in idle_state_store() local
[all …]
Di2c-mux-pca9541.c180 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in pca9541_arbitrate() local
181 struct pca9541 *data = i2c_mux_priv(muxc); in pca9541_arbitrate()
249 static int pca9541_select_chan(struct i2c_mux_core *muxc, u32 chan) in pca9541_select_chan() argument
251 struct pca9541 *data = i2c_mux_priv(muxc); in pca9541_select_chan()
274 static int pca9541_release_chan(struct i2c_mux_core *muxc, u32 chan) in pca9541_release_chan() argument
276 struct pca9541 *data = i2c_mux_priv(muxc); in pca9541_release_chan()
290 struct i2c_mux_core *muxc; in pca9541_probe() local
307 muxc = i2c_mux_alloc(adap, &client->dev, 1, sizeof(*data), in pca9541_probe()
310 if (!muxc) in pca9541_probe()
313 data = i2c_mux_priv(muxc); in pca9541_probe()
[all …]
Di2c-mux-reg.c61 static int i2c_mux_reg_select(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_reg_select() argument
63 struct regmux *mux = i2c_mux_priv(muxc); in i2c_mux_reg_select()
68 static int i2c_mux_reg_deselect(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_reg_deselect() argument
70 struct regmux *mux = i2c_mux_priv(muxc); in i2c_mux_reg_deselect()
158 struct i2c_mux_core *muxc; in i2c_mux_reg_probe() local
201 muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, 0, 0, in i2c_mux_reg_probe()
203 if (!muxc) { in i2c_mux_reg_probe()
207 muxc->priv = mux; in i2c_mux_reg_probe()
209 platform_set_drvdata(pdev, muxc); in i2c_mux_reg_probe()
212 muxc->deselect = i2c_mux_reg_deselect; in i2c_mux_reg_probe()
[all …]
Di2c-mux-ltc4306.c178 static int ltc4306_select_mux(struct i2c_mux_core *muxc, u32 chan) in ltc4306_select_mux() argument
180 struct ltc4306 *data = i2c_mux_priv(muxc); in ltc4306_select_mux()
186 static int ltc4306_deselect_mux(struct i2c_mux_core *muxc, u32 chan) in ltc4306_deselect_mux() argument
188 struct ltc4306 *data = i2c_mux_priv(muxc); in ltc4306_deselect_mux()
212 struct i2c_mux_core *muxc; in ltc4306_probe() local
227 muxc = i2c_mux_alloc(adap, &client->dev, in ltc4306_probe()
231 if (!muxc) in ltc4306_probe()
233 data = i2c_mux_priv(muxc); in ltc4306_probe()
236 i2c_set_clientdata(client, muxc); in ltc4306_probe()
283 ret = i2c_mux_add_adapter(muxc, 0, num, 0); in ltc4306_probe()
[all …]
/kernel/linux/linux-5.10/drivers/net/mdio/
Dmdio-mux-multiplexer.c13 struct mux_control *muxc; member
45 ret = mux_control_deselect(s->muxc); in mdio_mux_multiplexer_switch_fn()
52 ret = mux_control_select(s->muxc, desired_child); in mdio_mux_multiplexer_switch_fn()
74 s->muxc = devm_mux_control_get(dev, NULL); in mdio_mux_multiplexer_probe()
75 if (IS_ERR(s->muxc)) { in mdio_mux_multiplexer_probe()
76 ret = PTR_ERR(s->muxc); in mdio_mux_multiplexer_probe()
98 mux_control_deselect(s->muxc); in mdio_mux_multiplexer_remove()
/kernel/linux/linux-5.10/drivers/iio/imu/inv_mpu6050/
Dinv_mpu_i2c.c21 static int inv_mpu6050_select_bypass(struct i2c_mux_core *muxc, u32 chan_id) in inv_mpu6050_select_bypass() argument
138 st->muxc = i2c_mux_alloc(client->adapter, &client->dev, in inv_mpu_probe()
141 if (!st->muxc) in inv_mpu_probe()
143 st->muxc->priv = dev_get_drvdata(&client->dev); in inv_mpu_probe()
144 result = i2c_mux_add_adapter(st->muxc, 0, 0, 0); in inv_mpu_probe()
155 i2c_mux_del_adapters(st->muxc); in inv_mpu_probe()
164 if (st->muxc) { in inv_mpu_remove()
166 i2c_mux_del_adapters(st->muxc); in inv_mpu_remove()
Dinv_mpu_acpi.c172 mux_client = i2c_new_client_device(st->muxc->adapter[0], &info); in inv_mpu_acpi_create_mux_client()
/kernel/linux/linux-5.10/include/linux/
Di2c-mux.h46 static inline void *i2c_mux_priv(struct i2c_mux_core *muxc) in i2c_mux_priv() argument
48 return muxc->priv; in i2c_mux_priv()
58 int i2c_mux_add_adapter(struct i2c_mux_core *muxc,
62 void i2c_mux_del_adapters(struct i2c_mux_core *muxc);
/kernel/linux/linux-5.10/drivers/power/supply/
Dsbs-manager.c40 struct i2c_mux_core *muxc; member
172 static int sbsm_select(struct i2c_mux_core *muxc, u32 chan) in sbsm_select() argument
174 struct sbsm_data *data = i2c_mux_priv(muxc); in sbsm_select()
261 device_for_each_child(&sbsm->muxc->adapter[i]->dev, in sbsm_alert()
344 data->muxc = i2c_mux_alloc(adapter, dev, SBSM_MAX_BATS, 0, in sbsm_probe()
346 if (!data->muxc) { in sbsm_probe()
351 data->muxc->priv = data; in sbsm_probe()
356 ret = i2c_mux_add_adapter(data->muxc, 0, i + 1, 0); in sbsm_probe()
398 i2c_mux_del_adapters(data->muxc); in sbsm_probe()
408 i2c_mux_del_adapters(data->muxc); in sbsm_remove()
/kernel/linux/linux-5.10/drivers/media/usb/cx231xx/
Dcx231xx-i2c.c551 static int cx231xx_i2c_mux_select(struct i2c_mux_core *muxc, u32 chan_id) in cx231xx_i2c_mux_select() argument
553 struct cx231xx *dev = i2c_mux_priv(muxc); in cx231xx_i2c_mux_select()
560 dev->muxc = i2c_mux_alloc(&dev->i2c_bus[1].i2c_adap, dev->dev, 2, 0, 0, in cx231xx_i2c_mux_create()
562 if (!dev->muxc) in cx231xx_i2c_mux_create()
564 dev->muxc->priv = dev; in cx231xx_i2c_mux_create()
570 return i2c_mux_add_adapter(dev->muxc, in cx231xx_i2c_mux_register()
578 i2c_mux_del_adapters(dev->muxc); in cx231xx_i2c_mux_unregister()
591 return dev->muxc->adapter[0]; in cx231xx_get_i2c_adap()
593 return dev->muxc->adapter[1]; in cx231xx_get_i2c_adap()
/kernel/linux/linux-5.10/drivers/media/dvb-frontends/
Dsi2168.c590 static int si2168_select(struct i2c_mux_core *muxc, u32 chan) in si2168_select() argument
592 struct i2c_client *client = i2c_mux_priv(muxc); in si2168_select()
608 static int si2168_deselect(struct i2c_mux_core *muxc, u32 chan) in si2168_deselect() argument
610 struct i2c_client *client = i2c_mux_priv(muxc); in si2168_deselect()
731 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, in si2168_probe()
734 if (!dev->muxc) { in si2168_probe()
738 dev->muxc->priv = client; in si2168_probe()
739 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in si2168_probe()
746 *config->i2c_adapter = dev->muxc->adapter[0]; in si2168_probe()
774 i2c_mux_del_adapters(dev->muxc); in si2168_remove()
Drtl2830.c648 static int rtl2830_select(struct i2c_mux_core *muxc, u32 chan_id) in rtl2830_select() argument
650 struct i2c_client *client = i2c_mux_priv(muxc); in rtl2830_select()
683 return dev->muxc->adapter[0]; in rtl2830_get_i2c_adapter()
835 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in rtl2830_probe()
837 if (!dev->muxc) { in rtl2830_probe()
841 dev->muxc->priv = client; in rtl2830_probe()
842 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in rtl2830_probe()
874 i2c_mux_del_adapters(dev->muxc); in rtl2830_remove()
Drtl2832.c799 static int rtl2832_select(struct i2c_mux_core *muxc, u32 chan_id) in rtl2832_select() argument
801 struct rtl2832_dev *dev = i2c_mux_priv(muxc); in rtl2832_select()
819 static int rtl2832_deselect(struct i2c_mux_core *muxc, u32 chan_id) in rtl2832_deselect() argument
821 struct rtl2832_dev *dev = i2c_mux_priv(muxc); in rtl2832_deselect()
893 return dev->muxc->adapter[0]; in rtl2832_get_i2c_adapter()
1078 dev->muxc = i2c_mux_alloc(i2c, &i2c->dev, 1, 0, I2C_MUX_LOCKED, in rtl2832_probe()
1080 if (!dev->muxc) { in rtl2832_probe()
1084 dev->muxc->priv = dev; in rtl2832_probe()
1085 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in rtl2832_probe()
1120 i2c_mux_del_adapters(dev->muxc); in rtl2832_remove()
Daf9013.c16 struct i2c_mux_core *muxc; member
1228 return state->muxc->adapter[0]; in af9013_get_i2c_adapter()
1236 static int af9013_select(struct i2c_mux_core *muxc, u32 chan) in af9013_select() argument
1238 struct af9013_state *state = i2c_mux_priv(muxc); in af9013_select()
1257 static int af9013_deselect(struct i2c_mux_core *muxc, u32 chan) in af9013_deselect() argument
1259 struct af9013_state *state = i2c_mux_priv(muxc); in af9013_deselect()
1477 state->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in af9013_probe()
1479 if (!state->muxc) { in af9013_probe()
1483 state->muxc->priv = state; in af9013_probe()
1484 ret = i2c_mux_add_adapter(state->muxc, 0, 0, 0); in af9013_probe()
[all …]
Drtl2830_priv.h23 struct i2c_mux_core *muxc; member
Dsi2168_priv.h26 struct i2c_mux_core *muxc; member
Dlgdt3306a.c73 struct i2c_mux_core *muxc; member
2192 static int lgdt3306a_select(struct i2c_mux_core *muxc, u32 chan) in lgdt3306a_select() argument
2194 struct i2c_client *client = i2c_mux_priv(muxc); in lgdt3306a_select()
2200 static int lgdt3306a_deselect(struct i2c_mux_core *muxc, u32 chan) in lgdt3306a_deselect() argument
2202 struct i2c_client *client = i2c_mux_priv(muxc); in lgdt3306a_deselect()
2235 state->muxc = i2c_mux_alloc(client->adapter, &client->dev, in lgdt3306a_probe()
2238 if (!state->muxc) { in lgdt3306a_probe()
2242 state->muxc->priv = client; in lgdt3306a_probe()
2243 ret = i2c_mux_add_adapter(state->muxc, 0, 0, 0); in lgdt3306a_probe()
2249 *config->i2c_adapter = state->muxc->adapter[0]; in lgdt3306a_probe()
[all …]
Dm88ds3103_priv.h42 struct i2c_mux_core *muxc; member
Dm88ds3103.c1640 static int m88ds3103_select(struct i2c_mux_core *muxc, u32 chan) in m88ds3103_select() argument
1642 struct m88ds3103_dev *dev = i2c_mux_priv(muxc); in m88ds3103_select()
1764 return dev->muxc->adapter[0]; in m88ds3103_get_i2c_adapter()
1866 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in m88ds3103_probe()
1868 if (!dev->muxc) { in m88ds3103_probe()
1872 dev->muxc->priv = dev; in m88ds3103_probe()
1873 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in m88ds3103_probe()
1930 i2c_mux_del_adapters(dev->muxc); in m88ds3103_remove()

12