/Linux-v4.19/drivers/i2c/ |
D | i2c-mux.c | 34 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 …]
|
/Linux-v4.19/drivers/i2c/muxes/ |
D | i2c-mux-pinctrl.c | 33 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 …]
|
D | i2c-mux-mlxcpld.c | 104 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 …]
|
D | i2c-mux-gpmux.c | 26 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 …]
|
D | i2c-arb-gpio-challenge.c | 58 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 …]
|
D | i2c-mux-gpio.c | 39 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() 143 struct i2c_mux_core *muxc; in i2c_mux_gpio_probe() local 184 muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, in i2c_mux_gpio_probe() 188 if (!muxc) { in i2c_mux_gpio_probe() 192 mux->gpios = muxc->priv; in i2c_mux_gpio_probe() 194 muxc->priv = mux; in i2c_mux_gpio_probe() 196 platform_set_drvdata(pdev, muxc); in i2c_mux_gpio_probe() [all …]
|
D | i2c-mux-pca954x.c | 230 static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan) in pca954x_select_chan() argument 232 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_select_chan() 246 ret = pca954x_reg_write(muxc->parent, client, regval); in pca954x_select_chan() 253 static int pca954x_deselect_mux(struct i2c_mux_core *muxc, u32 chan) in pca954x_deselect_mux() argument 255 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_deselect_mux() 263 return pca954x_reg_write(muxc->parent, client, data->last_chan); in pca954x_deselect_mux() 298 static int pca954x_irq_setup(struct i2c_mux_core *muxc) in pca954x_irq_setup() argument 300 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_irq_setup() 329 static void pca954x_cleanup(struct i2c_mux_core *muxc) in pca954x_cleanup() argument 331 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_cleanup() [all …]
|
D | i2c-mux-pca9541.c | 180 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() 291 struct i2c_mux_core *muxc; in pca9541_probe() local 312 muxc = i2c_mux_alloc(adap, &client->dev, 1, sizeof(*data), in pca9541_probe() 315 if (!muxc) in pca9541_probe() 318 data = i2c_mux_priv(muxc); in pca9541_probe() [all …]
|
D | i2c-mux-reg.c | 65 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() 162 struct i2c_mux_core *muxc; in i2c_mux_reg_probe() local 210 muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, 0, 0, in i2c_mux_reg_probe() 212 if (!muxc) { in i2c_mux_reg_probe() 216 muxc->priv = mux; in i2c_mux_reg_probe() 218 platform_set_drvdata(pdev, muxc); in i2c_mux_reg_probe() 221 muxc->deselect = i2c_mux_reg_deselect; in i2c_mux_reg_probe() [all …]
|
D | i2c-mux-ltc4306.c | 179 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() 213 struct i2c_mux_core *muxc; in ltc4306_probe() local 228 muxc = i2c_mux_alloc(adap, &client->dev, in ltc4306_probe() 232 if (!muxc) in ltc4306_probe() 234 data = i2c_mux_priv(muxc); in ltc4306_probe() 237 i2c_set_clientdata(client, muxc); in ltc4306_probe() 284 ret = i2c_mux_add_adapter(muxc, 0, num, 0); in ltc4306_probe() [all …]
|
/Linux-v4.19/drivers/iio/imu/inv_mpu6050/ |
D | inv_mpu_i2c.c | 28 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() 49 static int inv_mpu6050_deselect_bypass(struct i2c_mux_core *muxc, u32 chan_id) in inv_mpu6050_deselect_bypass() argument 51 struct iio_dev *indio_dev = i2c_mux_priv(muxc); in inv_mpu6050_deselect_bypass() 134 st->muxc = i2c_mux_alloc(client->adapter, &client->dev, in inv_mpu_probe() 138 if (!st->muxc) in inv_mpu_probe() 140 st->muxc->priv = dev_get_drvdata(&client->dev); in inv_mpu_probe() 141 result = i2c_mux_add_adapter(st->muxc, 0, 0, 0); in inv_mpu_probe() 153 i2c_mux_del_adapters(st->muxc); in inv_mpu_probe() 162 if (st->muxc) { in inv_mpu_remove() [all …]
|
D | inv_mpu_acpi.c | 187 st->mux_client = i2c_new_device(st->muxc->adapter[0], &info); in inv_mpu_acpi_create_mux_client()
|
/Linux-v4.19/include/linux/ |
D | i2c-mux.h | 60 static inline void *i2c_mux_priv(struct i2c_mux_core *muxc) in i2c_mux_priv() argument 62 return muxc->priv; in i2c_mux_priv() 72 int i2c_mux_add_adapter(struct i2c_mux_core *muxc, 76 void i2c_mux_del_adapters(struct i2c_mux_core *muxc);
|
/Linux-v4.19/drivers/power/supply/ |
D | sbs-manager.c | 43 struct i2c_mux_core *muxc; member 175 static int sbsm_select(struct i2c_mux_core *muxc, u32 chan) in sbsm_select() argument 177 struct sbsm_data *data = i2c_mux_priv(muxc); in sbsm_select() 264 device_for_each_child(&sbsm->muxc->adapter[i]->dev, in sbsm_alert() 347 data->muxc = i2c_mux_alloc(adapter, dev, SBSM_MAX_BATS, 0, in sbsm_probe() 349 if (!data->muxc) { in sbsm_probe() 354 data->muxc->priv = data; in sbsm_probe() 359 ret = i2c_mux_add_adapter(data->muxc, 0, i + 1, 0); in sbsm_probe() 401 i2c_mux_del_adapters(data->muxc); in sbsm_probe() 411 i2c_mux_del_adapters(data->muxc); in sbsm_remove()
|
/Linux-v4.19/drivers/media/usb/cx231xx/ |
D | cx231xx-i2c.c | 562 static int cx231xx_i2c_mux_select(struct i2c_mux_core *muxc, u32 chan_id) in cx231xx_i2c_mux_select() argument 564 struct cx231xx *dev = i2c_mux_priv(muxc); in cx231xx_i2c_mux_select() 571 dev->muxc = i2c_mux_alloc(&dev->i2c_bus[1].i2c_adap, dev->dev, 2, 0, 0, in cx231xx_i2c_mux_create() 573 if (!dev->muxc) in cx231xx_i2c_mux_create() 575 dev->muxc->priv = dev; in cx231xx_i2c_mux_create() 581 return i2c_mux_add_adapter(dev->muxc, in cx231xx_i2c_mux_register() 589 i2c_mux_del_adapters(dev->muxc); in cx231xx_i2c_mux_unregister() 602 return dev->muxc->adapter[0]; in cx231xx_get_i2c_adap() 604 return dev->muxc->adapter[1]; in cx231xx_get_i2c_adap()
|
/Linux-v4.19/drivers/media/dvb-frontends/ |
D | si2168.c | 642 static int si2168_select(struct i2c_mux_core *muxc, u32 chan) in si2168_select() argument 644 struct i2c_client *client = i2c_mux_priv(muxc); in si2168_select() 662 static int si2168_deselect(struct i2c_mux_core *muxc, u32 chan) in si2168_deselect() argument 664 struct i2c_client *client = i2c_mux_priv(muxc); in si2168_deselect() 789 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, in si2168_probe() 792 if (!dev->muxc) { in si2168_probe() 796 dev->muxc->priv = client; in si2168_probe() 797 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in si2168_probe() 804 *config->i2c_adapter = dev->muxc->adapter[0]; in si2168_probe() 832 i2c_mux_del_adapters(dev->muxc); in si2168_remove()
|
D | rtl2830.c | 658 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()
|
D | rtl2832.c | 812 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()
|
D | af9013.c | 26 struct i2c_mux_core *muxc; member 1238 return state->muxc->adapter[0]; in af9013_get_i2c_adapter() 1246 static int af9013_select(struct i2c_mux_core *muxc, u32 chan) in af9013_select() argument 1248 struct af9013_state *state = i2c_mux_priv(muxc); in af9013_select() 1267 static int af9013_deselect(struct i2c_mux_core *muxc, u32 chan) in af9013_deselect() argument 1269 struct af9013_state *state = i2c_mux_priv(muxc); in af9013_deselect() 1487 state->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in af9013_probe() 1489 if (!state->muxc) { in af9013_probe() 1493 state->muxc->priv = state; in af9013_probe() 1494 ret = i2c_mux_add_adapter(state->muxc, 0, 0, 0); in af9013_probe() [all …]
|
D | rtl2830_priv.h | 33 struct i2c_mux_core *muxc; member
|
D | si2168_priv.h | 35 struct i2c_mux_core *muxc; member
|
D | lgdt3306a.c | 82 struct i2c_mux_core *muxc; member 2184 static int lgdt3306a_select(struct i2c_mux_core *muxc, u32 chan) in lgdt3306a_select() argument 2186 struct i2c_client *client = i2c_mux_priv(muxc); in lgdt3306a_select() 2192 static int lgdt3306a_deselect(struct i2c_mux_core *muxc, u32 chan) in lgdt3306a_deselect() argument 2194 struct i2c_client *client = i2c_mux_priv(muxc); in lgdt3306a_deselect() 2229 state->muxc = i2c_mux_alloc(client->adapter, &client->dev, in lgdt3306a_probe() 2232 if (!state->muxc) { in lgdt3306a_probe() 2236 state->muxc->priv = client; in lgdt3306a_probe() 2237 ret = i2c_mux_add_adapter(state->muxc, 0, 0, 0); in lgdt3306a_probe() 2243 *config->i2c_adapter = state->muxc->adapter[0]; in lgdt3306a_probe() [all …]
|
D | m88ds3103_priv.h | 44 struct i2c_mux_core *muxc; member
|
D | m88ds3103.c | 1235 static int m88ds3103_select(struct i2c_mux_core *muxc, u32 chan) in m88ds3103_select() argument 1237 struct m88ds3103_dev *dev = i2c_mux_priv(muxc); in m88ds3103_select() 1359 return dev->muxc->adapter[0]; in m88ds3103_get_i2c_adapter() 1459 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in m88ds3103_probe() 1461 if (!dev->muxc) { in m88ds3103_probe() 1465 dev->muxc->priv = dev; in m88ds3103_probe() 1466 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in m88ds3103_probe() 1497 i2c_mux_del_adapters(dev->muxc); in m88ds3103_remove()
|
/Linux-v4.19/drivers/of/ |
D | unittest.c | 1896 static int unittest_i2c_mux_select_chan(struct i2c_mux_core *muxc, u32 chan) in unittest_i2c_mux_select_chan() argument 1908 struct i2c_mux_core *muxc; in unittest_i2c_mux_probe() local 1931 muxc = i2c_mux_alloc(adap, dev, nchans, 0, 0, in unittest_i2c_mux_probe() 1933 if (!muxc) in unittest_i2c_mux_probe() 1936 if (i2c_mux_add_adapter(muxc, 0, i, 0)) { in unittest_i2c_mux_probe() 1938 i2c_mux_del_adapters(muxc); in unittest_i2c_mux_probe() 1943 i2c_set_clientdata(client, muxc); in unittest_i2c_mux_probe() 1952 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in unittest_i2c_mux_remove() local 1955 i2c_mux_del_adapters(muxc); in unittest_i2c_mux_remove()
|