Home
last modified time | relevance | path

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

/drivers/i2c/
Di2c-mux.c34 struct i2c_mux_core *muxc; member
42 struct i2c_mux_core *muxc = priv->muxc; in __i2c_mux_master_xfer() local
43 struct i2c_adapter *parent = muxc->parent; in __i2c_mux_master_xfer()
48 ret = muxc->select(muxc, priv->chan_id); in __i2c_mux_master_xfer()
51 if (muxc->deselect) in __i2c_mux_master_xfer()
52 muxc->deselect(muxc, priv->chan_id); in __i2c_mux_master_xfer()
61 struct i2c_mux_core *muxc = priv->muxc; in i2c_mux_master_xfer() local
62 struct i2c_adapter *parent = muxc->parent; in i2c_mux_master_xfer()
67 ret = muxc->select(muxc, priv->chan_id); in i2c_mux_master_xfer()
70 if (muxc->deselect) in i2c_mux_master_xfer()
[all …]
/drivers/i2c/muxes/
Di2c-mux-pinctrl.c33 static int i2c_mux_pinctrl_select(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_pinctrl_select() argument
35 struct i2c_mux_pinctrl *mux = i2c_mux_priv(muxc); in i2c_mux_pinctrl_select()
40 static int i2c_mux_pinctrl_deselect(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_pinctrl_deselect() argument
42 return i2c_mux_pinctrl_select(muxc, muxc->num_adapters); in i2c_mux_pinctrl_deselect()
88 struct i2c_mux_core *muxc; in i2c_mux_pinctrl_probe() local
106 muxc = i2c_mux_alloc(parent, dev, num_names, in i2c_mux_pinctrl_probe()
109 if (!muxc) { in i2c_mux_pinctrl_probe()
113 mux = i2c_mux_priv(muxc); in i2c_mux_pinctrl_probe()
116 platform_set_drvdata(pdev, muxc); in i2c_mux_pinctrl_probe()
149 muxc->deselect = i2c_mux_pinctrl_deselect; in i2c_mux_pinctrl_probe()
[all …]
Di2c-arb-gpio-challenge.c58 static int i2c_arbitrator_select(struct i2c_mux_core *muxc, u32 chan) in i2c_arbitrator_select() argument
60 const struct i2c_arbitrator_data *arb = i2c_mux_priv(muxc); in i2c_arbitrator_select()
92 dev_err(muxc->dev, "Could not claim bus, timeout\n"); in i2c_arbitrator_select()
101 static int i2c_arbitrator_deselect(struct i2c_mux_core *muxc, u32 chan) in i2c_arbitrator_deselect() argument
103 const struct i2c_arbitrator_data *arb = i2c_mux_priv(muxc); in i2c_arbitrator_deselect()
117 struct i2c_mux_core *muxc; in i2c_arbitrator_probe() local
133 muxc = i2c_mux_alloc(NULL, dev, 1, sizeof(*arb), I2C_MUX_ARBITRATOR, in i2c_arbitrator_probe()
135 if (!muxc) in i2c_arbitrator_probe()
137 arb = i2c_mux_priv(muxc); in i2c_arbitrator_probe()
139 platform_set_drvdata(pdev, muxc); in i2c_arbitrator_probe()
[all …]
Di2c-mux-mlxcpld.c124 static int mlxcpld_mux_select_chan(struct i2c_mux_core *muxc, u32 chan) in mlxcpld_mux_select_chan() argument
126 struct mlxcpld_mux *data = i2c_mux_priv(muxc); in mlxcpld_mux_select_chan()
133 err = mlxcpld_mux_reg_write(muxc->parent, client, regval); in mlxcpld_mux_select_chan()
140 static int mlxcpld_mux_deselect(struct i2c_mux_core *muxc, u32 chan) in mlxcpld_mux_deselect() argument
142 struct mlxcpld_mux *data = i2c_mux_priv(muxc); in mlxcpld_mux_deselect()
148 return mlxcpld_mux_reg_write(muxc->parent, client, data->last_chan); in mlxcpld_mux_deselect()
157 struct i2c_mux_core *muxc; in mlxcpld_mux_probe() local
168 muxc = i2c_mux_alloc(adap, &client->dev, CPLD_MUX_MAX_NCHANS, in mlxcpld_mux_probe()
171 if (!muxc) in mlxcpld_mux_probe()
174 data = i2c_mux_priv(muxc); in mlxcpld_mux_probe()
[all …]
Di2c-mux-gpmux.c26 static int i2c_mux_select(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_select() argument
28 struct mux *mux = i2c_mux_priv(muxc); in i2c_mux_select()
37 static int i2c_mux_deselect(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_deselect() argument
39 struct mux *mux = i2c_mux_priv(muxc); in i2c_mux_deselect()
77 struct i2c_mux_core *muxc; in i2c_mux_probe() local
106 muxc = i2c_mux_alloc(parent, dev, children, 0, 0, in i2c_mux_probe()
108 if (!muxc) { in i2c_mux_probe()
112 muxc->priv = mux; in i2c_mux_probe()
114 platform_set_drvdata(pdev, muxc); in i2c_mux_probe()
116 muxc->mux_locked = of_property_read_bool(np, "mux-locked"); in i2c_mux_probe()
[all …]
Di2c-mux-gpio.c39 static int i2c_mux_gpio_select(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_gpio_select() argument
41 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_select()
48 static int i2c_mux_gpio_deselect(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_gpio_deselect() argument
50 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_deselect()
142 struct i2c_mux_core *muxc; in i2c_mux_gpio_probe() local
183 muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, in i2c_mux_gpio_probe()
187 if (!muxc) { in i2c_mux_gpio_probe()
191 mux->gpios = muxc->priv; in i2c_mux_gpio_probe()
193 muxc->priv = mux; in i2c_mux_gpio_probe()
195 platform_set_drvdata(pdev, muxc); in i2c_mux_gpio_probe()
[all …]
Di2c-mux-pca954x.c193 static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan) in pca954x_select_chan() argument
195 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_select_chan()
209 ret = pca954x_reg_write(muxc->parent, client, regval); in pca954x_select_chan()
216 static int pca954x_deselect_mux(struct i2c_mux_core *muxc, u32 chan) in pca954x_deselect_mux() argument
218 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_deselect_mux()
226 return pca954x_reg_write(muxc->parent, client, data->last_chan); in pca954x_deselect_mux()
293 static int pca954x_irq_setup(struct i2c_mux_core *muxc) in pca954x_irq_setup() argument
295 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_irq_setup()
349 struct i2c_mux_core *muxc; in pca954x_probe() local
357 muxc = i2c_mux_alloc(adap, &client->dev, in pca954x_probe()
[all …]
Di2c-mux-reg.c65 static int i2c_mux_reg_select(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_reg_select() argument
67 struct regmux *mux = i2c_mux_priv(muxc); in i2c_mux_reg_select()
72 static int i2c_mux_reg_deselect(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_reg_deselect() argument
74 struct regmux *mux = i2c_mux_priv(muxc); in i2c_mux_reg_deselect()
167 struct i2c_mux_core *muxc; in i2c_mux_reg_probe() local
212 muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, 0, 0, in i2c_mux_reg_probe()
214 if (!muxc) { in i2c_mux_reg_probe()
218 muxc->priv = mux; in i2c_mux_reg_probe()
220 platform_set_drvdata(pdev, muxc); in i2c_mux_reg_probe()
223 muxc->deselect = i2c_mux_reg_deselect; in i2c_mux_reg_probe()
[all …]
Di2c-mux-pca9541.c227 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in pca9541_arbitrate() local
228 struct pca9541 *data = i2c_mux_priv(muxc); in pca9541_arbitrate()
296 static int pca9541_select_chan(struct i2c_mux_core *muxc, u32 chan) in pca9541_select_chan() argument
298 struct pca9541 *data = i2c_mux_priv(muxc); in pca9541_select_chan()
321 static int pca9541_release_chan(struct i2c_mux_core *muxc, u32 chan) in pca9541_release_chan() argument
323 struct pca9541 *data = i2c_mux_priv(muxc); in pca9541_release_chan()
338 struct i2c_mux_core *muxc; in pca9541_probe() local
359 muxc = i2c_mux_alloc(adap, &client->dev, 1, sizeof(*data), in pca9541_probe()
362 if (!muxc) in pca9541_probe()
365 data = i2c_mux_priv(muxc); in pca9541_probe()
[all …]
Di2c-mux-ltc4306.c179 static int ltc4306_select_mux(struct i2c_mux_core *muxc, u32 chan) in ltc4306_select_mux() argument
181 struct ltc4306 *data = i2c_mux_priv(muxc); in ltc4306_select_mux()
187 static int ltc4306_deselect_mux(struct i2c_mux_core *muxc, u32 chan) in ltc4306_deselect_mux() argument
189 struct ltc4306 *data = i2c_mux_priv(muxc); in ltc4306_deselect_mux()
214 struct i2c_mux_core *muxc; in ltc4306_probe() local
229 muxc = i2c_mux_alloc(adap, &client->dev, in ltc4306_probe()
233 if (!muxc) in ltc4306_probe()
235 data = i2c_mux_priv(muxc); in ltc4306_probe()
238 i2c_set_clientdata(client, muxc); in ltc4306_probe()
285 ret = i2c_mux_add_adapter(muxc, 0, num, 0); in ltc4306_probe()
[all …]
/drivers/iio/imu/inv_mpu6050/
Dinv_mpu_i2c.c28 static int inv_mpu6050_select_bypass(struct i2c_mux_core *muxc, u32 chan_id) in inv_mpu6050_select_bypass() argument
30 struct iio_dev *indio_dev = i2c_mux_priv(muxc); in inv_mpu6050_select_bypass()
56 static int inv_mpu6050_deselect_bypass(struct i2c_mux_core *muxc, u32 chan_id) in inv_mpu6050_deselect_bypass() argument
58 struct iio_dev *indio_dev = i2c_mux_priv(muxc); in inv_mpu6050_deselect_bypass()
136 st->muxc = i2c_mux_alloc(client->adapter, &client->dev, in inv_mpu_probe()
140 if (!st->muxc) { in inv_mpu_probe()
144 st->muxc->priv = dev_get_drvdata(&client->dev); in inv_mpu_probe()
145 result = i2c_mux_add_adapter(st->muxc, 0, 0, 0); in inv_mpu_probe()
156 i2c_mux_del_adapters(st->muxc); in inv_mpu_probe()
168 i2c_mux_del_adapters(st->muxc); in inv_mpu_remove()
Dinv_mpu_iio.h138 struct i2c_mux_core *muxc; member
Dinv_mpu_acpi.c187 st->mux_client = i2c_new_device(st->muxc->adapter[0], &info); in inv_mpu_acpi_create_mux_client()
/drivers/media/usb/cx231xx/
Dcx231xx-i2c.c564 static int cx231xx_i2c_mux_select(struct i2c_mux_core *muxc, u32 chan_id) in cx231xx_i2c_mux_select() argument
566 struct cx231xx *dev = i2c_mux_priv(muxc); in cx231xx_i2c_mux_select()
573 dev->muxc = i2c_mux_alloc(&dev->i2c_bus[1].i2c_adap, dev->dev, 2, 0, 0, in cx231xx_i2c_mux_create()
575 if (!dev->muxc) in cx231xx_i2c_mux_create()
577 dev->muxc->priv = dev; in cx231xx_i2c_mux_create()
583 return i2c_mux_add_adapter(dev->muxc, in cx231xx_i2c_mux_register()
591 i2c_mux_del_adapters(dev->muxc); in cx231xx_i2c_mux_unregister()
604 return dev->muxc->adapter[0]; in cx231xx_get_i2c_adap()
606 return dev->muxc->adapter[1]; in cx231xx_get_i2c_adap()
Dcx231xx.h629 struct i2c_mux_core *muxc; member
/drivers/media/dvb-frontends/
Dsi2168.c612 static int si2168_select(struct i2c_mux_core *muxc, u32 chan) in si2168_select() argument
614 struct i2c_client *client = i2c_mux_priv(muxc); in si2168_select()
632 static int si2168_deselect(struct i2c_mux_core *muxc, u32 chan) in si2168_deselect() argument
634 struct i2c_client *client = i2c_mux_priv(muxc); in si2168_deselect()
760 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, in si2168_probe()
763 if (!dev->muxc) { in si2168_probe()
767 dev->muxc->priv = client; in si2168_probe()
768 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in si2168_probe()
775 *config->i2c_adapter = dev->muxc->adapter[0]; in si2168_probe()
802 i2c_mux_del_adapters(dev->muxc); in si2168_remove()
Drtl2830.c658 static int rtl2830_select(struct i2c_mux_core *muxc, u32 chan_id) in rtl2830_select() argument
660 struct i2c_client *client = i2c_mux_priv(muxc); in rtl2830_select()
693 return dev->muxc->adapter[0]; in rtl2830_get_i2c_adapter()
845 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in rtl2830_probe()
847 if (!dev->muxc) { in rtl2830_probe()
851 dev->muxc->priv = client; in rtl2830_probe()
852 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in rtl2830_probe()
884 i2c_mux_del_adapters(dev->muxc); in rtl2830_remove()
Drtl2832.c812 static int rtl2832_select(struct i2c_mux_core *muxc, u32 chan_id) in rtl2832_select() argument
814 struct rtl2832_dev *dev = i2c_mux_priv(muxc); in rtl2832_select()
832 static int rtl2832_deselect(struct i2c_mux_core *muxc, u32 chan_id) in rtl2832_deselect() argument
834 struct rtl2832_dev *dev = i2c_mux_priv(muxc); in rtl2832_deselect()
906 return dev->muxc->adapter[0]; in rtl2832_get_i2c_adapter()
1091 dev->muxc = i2c_mux_alloc(i2c, &i2c->dev, 1, 0, I2C_MUX_LOCKED, in rtl2832_probe()
1093 if (!dev->muxc) { in rtl2832_probe()
1097 dev->muxc->priv = dev; in rtl2832_probe()
1098 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in rtl2832_probe()
1133 i2c_mux_del_adapters(dev->muxc); in rtl2832_remove()
Dlgdt3306a.c70 struct i2c_mux_core *muxc; member
1775 if (!state->muxc) in lgdt3306a_release()
2143 static int lgdt3306a_select(struct i2c_mux_core *muxc, u32 chan) in lgdt3306a_select() argument
2145 struct i2c_client *client = i2c_mux_priv(muxc); in lgdt3306a_select()
2151 static int lgdt3306a_deselect(struct i2c_mux_core *muxc, u32 chan) in lgdt3306a_deselect() argument
2153 struct i2c_client *client = i2c_mux_priv(muxc); in lgdt3306a_deselect()
2187 state->muxc = i2c_mux_alloc(client->adapter, &client->dev, in lgdt3306a_probe()
2190 if (!state->muxc) { in lgdt3306a_probe()
2194 state->muxc->priv = client; in lgdt3306a_probe()
2195 ret = i2c_mux_add_adapter(state->muxc, 0, 0, 0); in lgdt3306a_probe()
[all …]
Dm88ds3103.c1234 static int m88ds3103_select(struct i2c_mux_core *muxc, u32 chan) in m88ds3103_select() argument
1236 struct m88ds3103_dev *dev = i2c_mux_priv(muxc); in m88ds3103_select()
1358 return dev->muxc->adapter[0]; in m88ds3103_get_i2c_adapter()
1458 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in m88ds3103_probe()
1460 if (!dev->muxc) { in m88ds3103_probe()
1464 dev->muxc->priv = dev; in m88ds3103_probe()
1465 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in m88ds3103_probe()
1496 i2c_mux_del_adapters(dev->muxc); in m88ds3103_remove()
Drtl2830_priv.h33 struct i2c_mux_core *muxc; member
Dsi2168_priv.h35 struct i2c_mux_core *muxc; member
Dm88ds3103_priv.h44 struct i2c_mux_core *muxc; member
Drtl2832_priv.h38 struct i2c_mux_core *muxc; member
/drivers/of/
Dunittest.c1803 static int unittest_i2c_mux_select_chan(struct i2c_mux_core *muxc, u32 chan) in unittest_i2c_mux_select_chan() argument
1815 struct i2c_mux_core *muxc; in unittest_i2c_mux_probe() local
1839 muxc = i2c_mux_alloc(adap, dev, nchans, 0, 0, in unittest_i2c_mux_probe()
1841 if (!muxc) in unittest_i2c_mux_probe()
1844 ret = i2c_mux_add_adapter(muxc, 0, i, 0); in unittest_i2c_mux_probe()
1847 i2c_mux_del_adapters(muxc); in unittest_i2c_mux_probe()
1852 i2c_set_clientdata(client, muxc); in unittest_i2c_mux_probe()
1861 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in unittest_i2c_mux_remove() local
1864 i2c_mux_del_adapters(muxc); in unittest_i2c_mux_remove()