Home
last modified time | relevance | path

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

12

/linux/drivers/i2c/
H A 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 in i2c_mux_master_xfer() local
83 struct i2c_mux_core *muxc = priv->muxc; __i2c_mux_smbus_xfer() local
105 struct i2c_mux_core *muxc = priv->muxc; i2c_mux_smbus_xfer() local
232 struct i2c_mux_core *muxc; i2c_mux_alloc() local
270 i2c_mux_add_adapter(struct i2c_mux_core * muxc,u32 force_nr,u32 chan_id) i2c_mux_add_adapter() argument
419 i2c_mux_del_adapters(struct i2c_mux_core * muxc) i2c_mux_del_adapters() argument
[all...]
/linux/drivers/i2c/muxes/
H A Di2c-mux-mule.c23 static int mule_i2c_mux_select(struct i2c_mux_core *muxc, u32 dev) in mule_i2c_mux_select() argument
25 struct mule_i2c_reg_mux *mux = muxc->priv; in mule_i2c_mux_select()
30 static int mule_i2c_mux_deselect(struct i2c_mux_core *muxc, u32 dev) in mule_i2c_mux_deselect() argument
32 return mule_i2c_mux_select(muxc, MULE_I2C_MUX_DEFAULT_DEV); in mule_i2c_mux_deselect()
37 struct i2c_mux_core *muxc = data; in mule_i2c_mux_remove() local
39 i2c_mux_del_adapters(muxc); in mule_i2c_mux_remove()
41 mule_i2c_mux_deselect(muxc, MULE_I2C_MUX_DEFAULT_DEV); in mule_i2c_mux_remove()
49 struct i2c_mux_core *muxc; in mule_i2c_mux_probe() local
60 muxc = i2c_mux_alloc(client->adapter, mux_dev, ndev, sizeof(*priv), in mule_i2c_mux_probe()
62 if (!muxc) in mule_i2c_mux_probe()
[all...]
H A 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()
171 struct i2c_mux_core *muxc = platform_get_drvdata(pdev); i2c_mux_pinctrl_remove() local
[all...]
H A Di2c-mux-mlxcpld.c88 static int mlxcpld_mux_select_chan(struct i2c_mux_core *muxc, u32 chan) in mlxcpld_mux_select_chan() argument
90 struct mlxcpld_mux *mux = i2c_mux_priv(muxc); in mlxcpld_mux_select_chan()
99 err = mlxcpld_mux_reg_write(muxc->parent, mux, regval); in mlxcpld_mux_select_chan()
106 static int mlxcpld_mux_deselect(struct i2c_mux_core *muxc, u32 chan) in mlxcpld_mux_deselect() argument
108 struct mlxcpld_mux *mux = i2c_mux_priv(muxc); in mlxcpld_mux_deselect()
113 return mlxcpld_mux_reg_write(muxc->parent, mux, 0); in mlxcpld_mux_deselect()
121 struct i2c_mux_core *muxc; in mlxcpld_mux_probe() local
143 muxc = i2c_mux_alloc(client->adapter, &pdev->dev, pdata->num_adaps, in mlxcpld_mux_probe()
146 if (!muxc) in mlxcpld_mux_probe()
149 platform_set_drvdata(pdev, muxc); in mlxcpld_mux_probe()
175 struct i2c_mux_core *muxc = platform_get_drvdata(pdev); mlxcpld_mux_remove() local
[all...]
H A 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()
179 struct i2c_mux_core *muxc = platform_get_drvdata(pdev); i2c_arbitrator_remove() local
[all...]
H A 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 in i2c_mux_probe()
147 struct i2c_mux_core *muxc = platform_get_drvdata(pdev); i2c_mux_remove() local
[all...]
H A Di2c-mux-gpio.c35 static int i2c_mux_gpio_select(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_gpio_select() argument
37 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_select()
47 static int i2c_mux_gpio_deselect(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_gpio_deselect() argument
49 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_deselect()
130 struct i2c_mux_core *muxc; in i2c_mux_gpio_probe() local
161 muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, in i2c_mux_gpio_probe()
164 if (!muxc) { in i2c_mux_gpio_probe()
168 mux->gpios = muxc->priv; in i2c_mux_gpio_probe()
169 muxc->priv = mux; in i2c_mux_gpio_probe()
171 platform_set_drvdata(pdev, muxc); in i2c_mux_gpio_probe()
236 struct i2c_mux_core *muxc = platform_get_drvdata(pdev); i2c_mux_gpio_remove() local
[all...]
H A Di2c-mux-pca954x.c319 static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan) in pca954x_select_chan() argument
321 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_select_chan()
329 ret = pca954x_reg_write(muxc->parent, client, regval); in pca954x_select_chan()
336 static int pca954x_deselect_mux(struct i2c_mux_core *muxc, u32 chan) in pca954x_deselect_mux() argument
338 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_deselect_mux()
345 return pca954x_select_chan(muxc, idle_state); in pca954x_deselect_mux()
350 return pca954x_reg_write(muxc->parent, client, in pca954x_deselect_mux()
364 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in idle_state_show() local
365 struct pca954x *data = i2c_mux_priv(muxc); in idle_state_show()
375 struct i2c_mux_core *muxc in idle_state_store() local
434 pca954x_irq_setup(struct i2c_mux_core * muxc) pca954x_irq_setup() argument
464 pca954x_cleanup(struct i2c_mux_core * muxc) pca954x_cleanup() argument
561 struct i2c_mux_core *muxc; pca954x_probe() local
679 struct i2c_mux_core *muxc = i2c_get_clientdata(client); pca954x_remove() local
689 struct i2c_mux_core *muxc = i2c_get_clientdata(client); pca954x_resume() local
[all...]
H A 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
200 muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, 0, 0, in i2c_mux_reg_probe()
202 if (!muxc) { in i2c_mux_reg_probe()
206 muxc->priv = mux; in i2c_mux_reg_probe()
208 platform_set_drvdata(pdev, muxc); in i2c_mux_reg_probe()
211 muxc in i2c_mux_reg_probe()
236 struct i2c_mux_core *muxc = platform_get_drvdata(pdev); i2c_mux_reg_remove() local
[all...]
H A 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()
289 struct i2c_mux_core *muxc; in pca9541_probe() local
306 muxc = i2c_mux_alloc(adap, &client->dev, 1, sizeof(*data), in pca9541_probe()
309 if (!muxc) in pca9541_probe()
312 data = i2c_mux_priv(muxc); in pca9541_probe()
329 struct i2c_mux_core *muxc = i2c_get_clientdata(client); pca9541_remove() local
[all...]
H A Di2c-mux-ltc4306.c177 static int ltc4306_select_mux(struct i2c_mux_core *muxc, u32 chan) in ltc4306_select_mux() argument
179 struct ltc4306 *data = i2c_mux_priv(muxc); in ltc4306_select_mux()
185 static int ltc4306_deselect_mux(struct i2c_mux_core *muxc, u32 chan) in ltc4306_deselect_mux() argument
187 struct ltc4306 *data = i2c_mux_priv(muxc); in ltc4306_deselect_mux()
211 struct i2c_mux_core *muxc; in ltc4306_probe() local
226 muxc = i2c_mux_alloc(adap, &client->dev, in ltc4306_probe()
230 if (!muxc) in ltc4306_probe()
232 data = i2c_mux_priv(muxc); in ltc4306_probe()
235 i2c_set_clientdata(client, muxc); in ltc4306_probe()
282 ret = i2c_mux_add_adapter(muxc, in ltc4306_probe()
298 struct i2c_mux_core *muxc = i2c_get_clientdata(client); ltc4306_remove() local
[all...]
/linux/drivers/iio/imu/inv_mpu6050/
H A Dinv_mpu_i2c.c21 static int inv_mpu6050_select_bypass(struct i2c_mux_core *muxc, u32 chan_id) in inv_mpu6050_select_bypass() argument
140 st->muxc = i2c_mux_alloc(client->adapter, &client->dev, in inv_mpu_probe()
143 if (!st->muxc) in inv_mpu_probe()
145 st->muxc->priv = dev_get_drvdata(&client->dev); in inv_mpu_probe()
146 result = i2c_mux_add_adapter(st->muxc, 0, 0); in inv_mpu_probe()
157 i2c_mux_del_adapters(st->muxc); in inv_mpu_probe()
166 if (st->muxc) { in inv_mpu_remove()
168 i2c_mux_del_adapters(st->muxc); in inv_mpu_remove()
H A Dinv_mpu_acpi.c168 mux_client = i2c_new_client_device(st->muxc->adapter[0], &info); in inv_mpu_acpi_create_mux_client()
H A Dinv_mpu_iio.h200 struct i2c_mux_core *muxc; member
/linux/include/linux/
H A 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,
61 void i2c_mux_del_adapters(struct i2c_mux_core *muxc);
/linux/drivers/media/usb/cx231xx/
H A 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, 0, mux_no); in cx231xx_i2c_mux_register()
575 i2c_mux_del_adapters(dev->muxc); in cx231xx_i2c_mux_unregister()
588 return dev->muxc->adapter[0]; in cx231xx_get_i2c_adap()
590 return dev->muxc->adapter[1]; in cx231xx_get_i2c_adap()
/linux/drivers/media/dvb-frontends/
H A 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()
834 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in rtl2830_probe()
836 if (!dev->muxc) { in rtl2830_probe()
840 dev->muxc->priv = client; in rtl2830_probe()
841 ret = i2c_mux_add_adapter(dev->muxc, 0, 0); in rtl2830_probe()
873 i2c_mux_del_adapters(dev->muxc); in rtl2830_remove()
H A Drtl2832.c800 static int rtl2832_select(struct i2c_mux_core *muxc, u32 chan_id) in rtl2832_select() argument
802 struct rtl2832_dev *dev = i2c_mux_priv(muxc); in rtl2832_select()
820 static int rtl2832_deselect(struct i2c_mux_core *muxc, u32 chan_id) in rtl2832_deselect() argument
822 struct rtl2832_dev *dev = i2c_mux_priv(muxc); in rtl2832_deselect()
894 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); in rtl2832_probe()
1120 i2c_mux_del_adapters(dev->muxc); in rtl2832_remove()
[all...]
H A Drtl2830_priv.h23 struct i2c_mux_core *muxc; member
H A Dlgdt3306a.c73 struct i2c_mux_core *muxc; member
2156 static int lgdt3306a_select(struct i2c_mux_core *muxc, u32 chan) in lgdt3306a_select() argument
2158 struct i2c_client *client = i2c_mux_priv(muxc); in lgdt3306a_select()
2164 static int lgdt3306a_deselect(struct i2c_mux_core *muxc, u32 chan) in lgdt3306a_deselect() argument
2166 struct i2c_client *client = i2c_mux_priv(muxc); in lgdt3306a_deselect()
2203 state->muxc = i2c_mux_alloc(client->adapter, &client->dev, in lgdt3306a_probe()
2206 if (!state->muxc) { in lgdt3306a_probe()
2210 state->muxc->priv = client; in lgdt3306a_probe()
2211 ret = i2c_mux_add_adapter(state->muxc, 0, 0); in lgdt3306a_probe()
2217 *config->i2c_adapter = state->muxc in lgdt3306a_probe()
[all...]
H A Dsi2168_priv.h25 struct i2c_mux_core *muxc; member
H A Dm88ds3103.c1643 static int m88ds3103_select(struct i2c_mux_core *muxc, u32 chan) in m88ds3103_select() argument
1645 struct m88ds3103_dev *dev = i2c_mux_priv(muxc); in m88ds3103_select()
1767 return dev->muxc->adapter[0]; in m88ds3103_get_i2c_adapter()
1869 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in m88ds3103_probe()
1871 if (!dev->muxc) { in m88ds3103_probe()
1875 dev->muxc->priv = dev; in m88ds3103_probe()
1876 ret = i2c_mux_add_adapter(dev->muxc, 0, 0); in m88ds3103_probe()
1919 i2c_mux_del_adapters(dev->muxc); in m88ds3103_probe()
1935 i2c_mux_del_adapters(dev->muxc); in m88ds3103_remove()
H A Drtl2832_priv.h25 struct i2c_mux_core *muxc; member
/linux/drivers/usb/typec/ucsi/
H A Ducsi_yoga_c630.c182 unsigned int muxc, ccst, dppn, hpds, hsfl; in yoga_c630_ucsi_read_port0_status() local
186 muxc = FIELD_GET(USB_MUX_MUXC, val); in yoga_c630_ucsi_read_port0_status()
192 dev_dbg(uec->ucsi->dev, " mux %04x (muxc %d ccst %d dppn %d hpds %d hsfl %d)\n", in yoga_c630_ucsi_read_port0_status()
194 muxc, ccst, dppn, hpds, hsfl); in yoga_c630_ucsi_read_port0_status()
/linux/drivers/of/
H A Dunittest.c3071 static int unittest_i2c_mux_select_chan(struct i2c_mux_core *muxc, u32 chan) in unittest_i2c_mux_select_chan() argument
3082 struct i2c_mux_core *muxc; in unittest_i2c_mux_probe() local
3105 muxc = i2c_mux_alloc(adap, dev, nchans, 0, 0, in unittest_i2c_mux_probe()
3107 if (!muxc) in unittest_i2c_mux_probe()
3110 if (i2c_mux_add_adapter(muxc, 0, i)) { in unittest_i2c_mux_probe()
3112 i2c_mux_del_adapters(muxc); in unittest_i2c_mux_probe()
3117 i2c_set_clientdata(client, muxc); in unittest_i2c_mux_probe()
3126 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in unittest_i2c_mux_remove() local
3129 i2c_mux_del_adapters(muxc); in unittest_i2c_mux_remove()

12