/linux-master/drivers/i2c/ |
H A D | i2c-mux.c | 35 struct i2c_mux_core *muxc; member in struct:i2c_mux_priv 43 struct i2c_mux_core *muxc = priv->muxc; local 44 struct i2c_adapter *parent = muxc->parent; 49 ret = muxc->select(muxc, priv->chan_id); 52 if (muxc->deselect) 53 muxc->deselect(muxc, priv->chan_id); 62 struct i2c_mux_core *muxc local 83 struct i2c_mux_core *muxc = priv->muxc; local 105 struct i2c_mux_core *muxc = priv->muxc; local 245 struct i2c_mux_core *muxc; local 283 i2c_mux_add_adapter(struct i2c_mux_core *muxc, u32 force_nr, u32 chan_id, unsigned int class) argument 441 i2c_mux_del_adapters(struct i2c_mux_core *muxc) argument [all...] |
/linux-master/drivers/i2c/muxes/ |
H A D | i2c-mux-pinctrl.c | 22 static int i2c_mux_pinctrl_select(struct i2c_mux_core *muxc, u32 chan) argument 24 struct i2c_mux_pinctrl *mux = i2c_mux_priv(muxc); 29 static int i2c_mux_pinctrl_deselect(struct i2c_mux_core *muxc, u32 chan) argument 31 return i2c_mux_pinctrl_select(muxc, muxc->num_adapters); 77 struct i2c_mux_core *muxc; local 95 muxc = i2c_mux_alloc(parent, dev, num_names, 98 if (!muxc) { 102 mux = i2c_mux_priv(muxc); 104 platform_set_drvdata(pdev, muxc); 171 struct i2c_mux_core *muxc = platform_get_drvdata(pdev); local [all...] |
H A D | i2c-arb-gpio-challenge.c | 42 static int i2c_arbitrator_select(struct i2c_mux_core *muxc, u32 chan) argument 44 const struct i2c_arbitrator_data *arb = i2c_mux_priv(muxc); 76 dev_err(muxc->dev, "Could not claim bus, timeout\n"); 85 static int i2c_arbitrator_deselect(struct i2c_mux_core *muxc, u32 chan) argument 87 const struct i2c_arbitrator_data *arb = i2c_mux_priv(muxc); 101 struct i2c_mux_core *muxc; local 116 muxc = i2c_mux_alloc(NULL, dev, 1, sizeof(*arb), I2C_MUX_ARBITRATOR, 118 if (!muxc) 120 arb = i2c_mux_priv(muxc); 122 platform_set_drvdata(pdev, muxc); 179 struct i2c_mux_core *muxc = platform_get_drvdata(pdev); local [all...] |
H A D | i2c-mux-mlxcpld.c | 88 static int mlxcpld_mux_select_chan(struct i2c_mux_core *muxc, u32 chan) argument 90 struct mlxcpld_mux *mux = i2c_mux_priv(muxc); 99 err = mlxcpld_mux_reg_write(muxc->parent, mux, regval); 106 static int mlxcpld_mux_deselect(struct i2c_mux_core *muxc, u32 chan) argument 108 struct mlxcpld_mux *mux = i2c_mux_priv(muxc); 113 return mlxcpld_mux_reg_write(muxc->parent, mux, 0); 121 struct i2c_mux_core *muxc; local 143 muxc = i2c_mux_alloc(client->adapter, &pdev->dev, pdata->num_adaps, 146 if (!muxc) 149 platform_set_drvdata(pdev, muxc); 175 struct i2c_mux_core *muxc = platform_get_drvdata(pdev); local [all...] |
H A D | i2c-mux-gpmux.c | 23 static int i2c_mux_select(struct i2c_mux_core *muxc, u32 chan) argument 25 struct mux *mux = i2c_mux_priv(muxc); 34 static int i2c_mux_deselect(struct i2c_mux_core *muxc, u32 chan) argument 36 struct mux *mux = i2c_mux_priv(muxc); 74 struct i2c_mux_core *muxc; local 99 muxc = i2c_mux_alloc(parent, dev, children, 0, 0, 101 if (!muxc) { 105 muxc->priv = mux; 107 platform_set_drvdata(pdev, muxc); 109 muxc 147 struct i2c_mux_core *muxc = platform_get_drvdata(pdev); local [all...] |
H A D | i2c-mux-gpio.c | 34 static int i2c_mux_gpio_select(struct i2c_mux_core *muxc, u32 chan) argument 36 struct gpiomux *mux = i2c_mux_priv(muxc); 43 static int i2c_mux_gpio_deselect(struct i2c_mux_core *muxc, u32 chan) argument 45 struct gpiomux *mux = i2c_mux_priv(muxc); 124 struct i2c_mux_core *muxc; local 155 muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, 158 if (!muxc) { 162 mux->gpios = muxc->priv; 163 muxc->priv = mux; 165 platform_set_drvdata(pdev, muxc); 231 struct i2c_mux_core *muxc = platform_get_drvdata(pdev); local [all...] |
H A D | i2c-mux-reg.c | 61 static int i2c_mux_reg_select(struct i2c_mux_core *muxc, u32 chan) argument 63 struct regmux *mux = i2c_mux_priv(muxc); 68 static int i2c_mux_reg_deselect(struct i2c_mux_core *muxc, u32 chan) argument 70 struct regmux *mux = i2c_mux_priv(muxc); 158 struct i2c_mux_core *muxc; local 200 muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, 0, 0, 202 if (!muxc) { 206 muxc->priv = mux; 208 platform_set_drvdata(pdev, muxc); 211 muxc 236 struct i2c_mux_core *muxc = platform_get_drvdata(pdev); local [all...] |
H A D | i2c-mux-pca9541.c | 180 struct i2c_mux_core *muxc = i2c_get_clientdata(client); local 181 struct pca9541 *data = i2c_mux_priv(muxc); 249 static int pca9541_select_chan(struct i2c_mux_core *muxc, u32 chan) argument 251 struct pca9541 *data = i2c_mux_priv(muxc); 274 static int pca9541_release_chan(struct i2c_mux_core *muxc, u32 chan) argument 276 struct pca9541 *data = i2c_mux_priv(muxc); 289 struct i2c_mux_core *muxc; local 306 muxc = i2c_mux_alloc(adap, &client->dev, 1, sizeof(*data), 309 if (!muxc) 312 data = i2c_mux_priv(muxc); 329 struct i2c_mux_core *muxc = i2c_get_clientdata(client); local [all...] |
H A D | i2c-mux-ltc4306.c | 177 static int ltc4306_select_mux(struct i2c_mux_core *muxc, u32 chan) argument 179 struct ltc4306 *data = i2c_mux_priv(muxc); 185 static int ltc4306_deselect_mux(struct i2c_mux_core *muxc, u32 chan) argument 187 struct ltc4306 *data = i2c_mux_priv(muxc); 211 struct i2c_mux_core *muxc; local 226 muxc = i2c_mux_alloc(adap, &client->dev, 230 if (!muxc) 232 data = i2c_mux_priv(muxc); 235 i2c_set_clientdata(client, muxc); 282 ret = i2c_mux_add_adapter(muxc, 298 struct i2c_mux_core *muxc = i2c_get_clientdata(client); local [all...] |
H A D | i2c-mux-pca954x.c | 319 static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan) argument 321 struct pca954x *data = i2c_mux_priv(muxc); 329 ret = pca954x_reg_write(muxc->parent, client, regval); 336 static int pca954x_deselect_mux(struct i2c_mux_core *muxc, u32 chan) argument 338 struct pca954x *data = i2c_mux_priv(muxc); 345 return pca954x_select_chan(muxc, idle_state); 350 return pca954x_reg_write(muxc->parent, client, 364 struct i2c_mux_core *muxc = i2c_get_clientdata(client); local 365 struct pca954x *data = i2c_mux_priv(muxc); 375 struct i2c_mux_core *muxc local 434 pca954x_irq_setup(struct i2c_mux_core *muxc) argument 465 pca954x_cleanup(struct i2c_mux_core *muxc) argument 562 struct i2c_mux_core *muxc; local 680 struct i2c_mux_core *muxc = i2c_get_clientdata(client); local 690 struct i2c_mux_core *muxc = i2c_get_clientdata(client); local [all...] |
/linux-master/include/linux/ |
H A D | i2c-mux.h | 46 static inline void *i2c_mux_priv(struct i2c_mux_core *muxc) argument 48 return muxc->priv; 58 int i2c_mux_add_adapter(struct i2c_mux_core *muxc, 62 void i2c_mux_del_adapters(struct i2c_mux_core *muxc);
|
/linux-master/drivers/net/mdio/ |
H A D | mdio-mux-multiplexer.c | 13 struct mux_control *muxc; member in struct:mdio_mux_multiplexer_state 45 ret = mux_control_deselect(s->muxc); 52 ret = mux_control_select(s->muxc, desired_child); 74 s->muxc = devm_mux_control_get(dev, NULL); 75 if (IS_ERR(s->muxc)) 76 return dev_err_probe(&pdev->dev, PTR_ERR(s->muxc), 95 mux_control_deselect(s->muxc);
|
/linux-master/drivers/iio/imu/inv_mpu6050/ |
H A D | inv_mpu_i2c.c | 21 static int inv_mpu6050_select_bypass(struct i2c_mux_core *muxc, u32 chan_id) argument 139 st->muxc = i2c_mux_alloc(client->adapter, &client->dev, 142 if (!st->muxc) 144 st->muxc->priv = dev_get_drvdata(&client->dev); 145 result = i2c_mux_add_adapter(st->muxc, 0, 0, 0); 156 i2c_mux_del_adapters(st->muxc); 165 if (st->muxc) { 167 i2c_mux_del_adapters(st->muxc);
|
H A D | inv_mpu_acpi.c | 171 mux_client = i2c_new_client_device(st->muxc->adapter[0], &info);
|
/linux-master/drivers/media/dvb-frontends/ |
H A D | si2168_priv.h | 25 struct i2c_mux_core *muxc; member in struct:si2168_dev
|
H A D | rtl2830_priv.h | 23 struct i2c_mux_core *muxc; member in struct:rtl2830_dev
|
H A D | rtl2832.c | 800 static int rtl2832_select(struct i2c_mux_core *muxc, u32 chan_id) argument 802 struct rtl2832_dev *dev = i2c_mux_priv(muxc); 820 static int rtl2832_deselect(struct i2c_mux_core *muxc, u32 chan_id) argument 822 struct rtl2832_dev *dev = i2c_mux_priv(muxc); 894 return dev->muxc->adapter[0]; 1078 dev->muxc = i2c_mux_alloc(i2c, &i2c->dev, 1, 0, I2C_MUX_LOCKED, 1080 if (!dev->muxc) { 1084 dev->muxc->priv = dev; 1085 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); 1120 i2c_mux_del_adapters(dev->muxc); [all...] |
H A D | si2168.c | 598 static int si2168_select(struct i2c_mux_core *muxc, u32 chan) argument 600 struct i2c_client *client = i2c_mux_priv(muxc); 616 static int si2168_deselect(struct i2c_mux_core *muxc, u32 chan) argument 618 struct i2c_client *client = i2c_mux_priv(muxc); 739 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, 742 if (!dev->muxc) { 746 dev->muxc->priv = client; 747 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); 754 *config->i2c_adapter = dev->muxc->adapter[0]; 782 i2c_mux_del_adapters(dev->muxc); [all...] |
H A D | af9013.c | 16 struct i2c_mux_core *muxc; member in struct:af9013_state 1228 return state->muxc->adapter[0]; 1236 static int af9013_select(struct i2c_mux_core *muxc, u32 chan) argument 1238 struct af9013_state *state = i2c_mux_priv(muxc); 1257 static int af9013_deselect(struct i2c_mux_core *muxc, u32 chan) argument 1259 struct af9013_state *state = i2c_mux_priv(muxc); 1476 state->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, 1478 if (!state->muxc) { 1482 state->muxc->priv = state; 1483 ret = i2c_mux_add_adapter(state->muxc, [all...] |
H A D | rtl2830.c | 648 static int rtl2830_select(struct i2c_mux_core *muxc, u32 chan_id) argument 650 struct i2c_client *client = i2c_mux_priv(muxc); 683 return dev->muxc->adapter[0]; 834 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, 836 if (!dev->muxc) { 840 dev->muxc->priv = client; 841 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); 873 i2c_mux_del_adapters(dev->muxc);
|
H A D | lgdt3306a.c | 73 struct i2c_mux_core *muxc; member in struct:lgdt3306a_state 2156 static int lgdt3306a_select(struct i2c_mux_core *muxc, u32 chan) argument 2158 struct i2c_client *client = i2c_mux_priv(muxc); 2164 static int lgdt3306a_deselect(struct i2c_mux_core *muxc, u32 chan) argument 2166 struct i2c_client *client = i2c_mux_priv(muxc); 2198 state->muxc = i2c_mux_alloc(client->adapter, &client->dev, 2201 if (!state->muxc) { 2205 state->muxc->priv = client; 2206 ret = i2c_mux_add_adapter(state->muxc, 0, 0, 0); 2212 *config->i2c_adapter = state->muxc [all...] |
H A D | m88ds3103.c | 1636 static int m88ds3103_select(struct i2c_mux_core *muxc, u32 chan) argument 1638 struct m88ds3103_dev *dev = i2c_mux_priv(muxc); 1760 return dev->muxc->adapter[0]; 1862 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, 1864 if (!dev->muxc) { 1868 dev->muxc->priv = dev; 1869 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); 1912 i2c_mux_del_adapters(dev->muxc); 1928 i2c_mux_del_adapters(dev->muxc);
|
H A D | rtl2832_priv.h | 25 struct i2c_mux_core *muxc; member in struct:rtl2832_dev
|
/linux-master/drivers/power/supply/ |
H A D | sbs-manager.c | 40 struct i2c_mux_core *muxc; member in struct:sbsm_data 172 static int sbsm_select(struct i2c_mux_core *muxc, u32 chan) argument 174 struct sbsm_data *data = i2c_mux_priv(muxc); 261 device_for_each_child(&sbsm->muxc->adapter[i]->dev, 315 i2c_mux_del_adapters(sbsm->muxc); 348 data->muxc = i2c_mux_alloc(adapter, dev, SBSM_MAX_BATS, 0, 350 if (!data->muxc) 352 data->muxc->priv = data; 361 ret = i2c_mux_add_adapter(data->muxc, 0, i + 1, 0);
|
/linux-master/drivers/media/usb/cx231xx/ |
H A D | cx231xx-i2c.c | 551 static int cx231xx_i2c_mux_select(struct i2c_mux_core *muxc, u32 chan_id) argument 553 struct cx231xx *dev = i2c_mux_priv(muxc); 560 dev->muxc = i2c_mux_alloc(&dev->i2c_bus[1].i2c_adap, dev->dev, 2, 0, 0, 562 if (!dev->muxc) 564 dev->muxc->priv = dev; 570 return i2c_mux_add_adapter(dev->muxc, 578 i2c_mux_del_adapters(dev->muxc); 591 return dev->muxc->adapter[0]; 593 return dev->muxc->adapter[1];
|