/linux-6.3-rc2/drivers/i2c/ |
A D | i2c-mux.c | 43 struct i2c_mux_core *muxc = priv->muxc; in __i2c_mux_master_xfer() local 49 ret = muxc->select(muxc, priv->chan_id); 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 68 ret = muxc->select(muxc, priv->chan_id); in i2c_mux_master_xfer() 72 muxc->deselect(muxc, priv->chan_id); in i2c_mux_master_xfer() 83 struct i2c_mux_core *muxc = priv->muxc; in __i2c_mux_smbus_xfer() local 94 muxc->deselect(muxc, priv->chan_id); in __i2c_mux_smbus_xfer() 105 struct i2c_mux_core *muxc = priv->muxc; in i2c_mux_smbus_xfer() local 116 muxc->deselect(muxc, priv->chan_id); in i2c_mux_smbus_xfer() [all …]
|
/linux-6.3-rc2/drivers/i2c/muxes/ |
A D | i2c-mux-pinctrl.c | 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 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() 142 muxc->mux_locked = true; in i2c_mux_pinctrl_probe() 145 muxc->mux_locked = false; in i2c_mux_pinctrl_probe() 149 if (muxc->mux_locked) in i2c_mux_pinctrl_probe() 162 i2c_mux_del_adapters(muxc); in i2c_mux_pinctrl_probe() 173 i2c_mux_del_adapters(muxc); in i2c_mux_pinctrl_remove() [all …]
|
A D | i2c-mux-mlxcpld.c | 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() 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 146 if (!muxc) in mlxcpld_mux_probe() 149 platform_set_drvdata(pdev, muxc); in mlxcpld_mux_probe() 150 data = i2c_mux_priv(muxc); in mlxcpld_mux_probe() 164 pdata->completion_notify(pdata->handle, muxc->parent, muxc->adapter); in mlxcpld_mux_probe() 169 i2c_mux_del_adapters(muxc); in mlxcpld_mux_probe() [all …]
|
A D | i2c-arb-gpio-challenge.c | 76 dev_err(muxc->dev, "Could not claim bus, timeout\n"); in i2c_arbitrator_select() 101 struct i2c_mux_core *muxc; in i2c_arbitrator_probe() local 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() 162 muxc->parent = of_get_i2c_adapter_by_node(parent_np); in i2c_arbitrator_probe() 164 if (!muxc->parent) { in i2c_arbitrator_probe() 170 ret = i2c_mux_add_adapter(muxc, 0, 0, 0); in i2c_arbitrator_probe() 172 i2c_put_adapter(muxc->parent); in i2c_arbitrator_probe() 181 i2c_mux_del_adapters(muxc); in i2c_arbitrator_remove() [all …]
|
A D | i2c-mux-gpmux.c | 25 struct mux *mux = i2c_mux_priv(muxc); in i2c_mux_select() 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() 127 ret = i2c_mux_add_adapter(muxc, 0, chan, 0); in i2c_mux_probe() 138 i2c_mux_del_adapters(muxc); in i2c_mux_probe() 149 i2c_mux_del_adapters(muxc); in i2c_mux_remove() [all …]
|
A D | i2c-mux-gpio.c | 124 struct i2c_mux_core *muxc; in i2c_mux_gpio_probe() local 158 if (!muxc) { in i2c_mux_gpio_probe() 162 mux->gpios = muxc->priv; in i2c_mux_gpio_probe() 163 muxc->priv = mux; in i2c_mux_gpio_probe() 165 platform_set_drvdata(pdev, muxc); in i2c_mux_gpio_probe() 169 muxc->mux_locked = true; in i2c_mux_gpio_probe() 195 if (!muxc->mux_locked) in i2c_mux_gpio_probe() 203 if (muxc->mux_locked) in i2c_mux_gpio_probe() 221 i2c_mux_del_adapters(muxc); in i2c_mux_gpio_probe() 232 i2c_mux_del_adapters(muxc); in i2c_mux_gpio_remove() [all …]
|
A D | i2c-mux-pca954x.c | 236 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_select_chan() 253 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_deselect_mux() 311 ret = pca954x_deselect_mux(muxc, 0); in idle_state_store() 392 i2c_mux_del_adapters(muxc); in pca954x_cleanup() 420 struct i2c_mux_core *muxc; in pca954x_probe() local 430 if (!muxc) in pca954x_probe() 432 data = i2c_mux_priv(muxc); in pca954x_probe() 434 i2c_set_clientdata(client, muxc); in pca954x_probe() 487 ret = pca954x_irq_setup(muxc); in pca954x_probe() 520 pca954x_cleanup(muxc); in pca954x_probe() [all …]
|
A 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() 251 struct pca9541 *data = i2c_mux_priv(muxc); in pca9541_select_chan() 276 struct pca9541 *data = i2c_mux_priv(muxc); in pca9541_release_chan() 289 struct i2c_mux_core *muxc; in pca9541_probe() local 309 if (!muxc) in pca9541_probe() 312 data = i2c_mux_priv(muxc); in pca9541_probe() 315 i2c_set_clientdata(client, muxc); in pca9541_probe() 317 ret = i2c_mux_add_adapter(muxc, 0, 0, 0); in pca9541_probe() 329 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in pca9541_remove() local [all …]
|
A D | i2c-mux-reg.c | 63 struct regmux *mux = i2c_mux_priv(muxc); in i2c_mux_reg_select() 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 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() 224 mux->data.n_values, muxc->parent->name); in i2c_mux_reg_probe() 229 i2c_mux_del_adapters(muxc); in i2c_mux_reg_probe() 240 i2c_mux_del_adapters(muxc); in i2c_mux_reg_remove() [all …]
|
A D | i2c-mux-ltc4306.c | 180 struct ltc4306 *data = i2c_mux_priv(muxc); in ltc4306_select_mux() 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() 285 i2c_mux_del_adapters(muxc); in ltc4306_probe() 299 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in ltc4306_remove() local [all …]
|
/linux-6.3-rc2/drivers/net/mdio/ |
A D | mdio-mux-multiplexer.c | 13 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 return dev_err_probe(&pdev->dev, PTR_ERR(s->muxc), in mdio_mux_multiplexer_probe() 95 mux_control_deselect(s->muxc); in mdio_mux_multiplexer_remove()
|
/linux-6.3-rc2/drivers/iio/imu/inv_mpu6050/ |
A D | inv_mpu_i2c.c | 21 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()
|
/linux-6.3-rc2/include/linux/ |
A D | i2c-mux.h | 46 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);
|
/linux-6.3-rc2/drivers/power/supply/ |
A D | sbs-manager.c | 40 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() 315 i2c_mux_del_adapters(sbsm->muxc); in sbsm_del_mux_adapter() 348 data->muxc = i2c_mux_alloc(adapter, dev, SBSM_MAX_BATS, 0, in sbsm_probe() 350 if (!data->muxc) in sbsm_probe() 352 data->muxc->priv = data; in sbsm_probe() 361 ret = i2c_mux_add_adapter(data->muxc, 0, i + 1, 0); in sbsm_probe()
|
/linux-6.3-rc2/drivers/media/usb/cx231xx/ |
A D | cx231xx-i2c.c | 551 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()
|
/linux-6.3-rc2/drivers/media/dvb-frontends/ |
A D | si2168.c | 598 static int si2168_select(struct i2c_mux_core *muxc, u32 chan) in si2168_select() argument 600 struct i2c_client *client = i2c_mux_priv(muxc); in si2168_select() 616 static int si2168_deselect(struct i2c_mux_core *muxc, u32 chan) in si2168_deselect() argument 618 struct i2c_client *client = i2c_mux_priv(muxc); in si2168_deselect() 739 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, in si2168_probe() 742 if (!dev->muxc) { in si2168_probe() 746 dev->muxc->priv = client; in si2168_probe() 747 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in si2168_probe() 754 *config->i2c_adapter = dev->muxc->adapter[0]; in si2168_probe() 782 i2c_mux_del_adapters(dev->muxc); in si2168_remove()
|
A D | rtl2830.c | 648 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, 0); in rtl2830_probe() 873 i2c_mux_del_adapters(dev->muxc); in rtl2830_remove()
|
A D | rtl2832.c | 800 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, 0); in rtl2832_probe() 1120 i2c_mux_del_adapters(dev->muxc); in rtl2832_remove()
|
A D | af9013.c | 16 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() 1478 if (!state->muxc) { in af9013_probe() 1482 state->muxc->priv = state; in af9013_probe() 1483 ret = i2c_mux_add_adapter(state->muxc, 0, 0, 0); in af9013_probe() 1532 i2c_mux_del_adapters(state->muxc); in af9013_probe() [all …]
|
A D | rtl2830_priv.h | 23 struct i2c_mux_core *muxc; member
|
A D | lgdt3306a.c | 73 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() 2198 state->muxc = i2c_mux_alloc(client->adapter, &client->dev, in lgdt3306a_probe() 2201 if (!state->muxc) { in lgdt3306a_probe() 2205 state->muxc->priv = client; in lgdt3306a_probe() 2206 ret = i2c_mux_add_adapter(state->muxc, 0, 0, 0); in lgdt3306a_probe() 2212 *config->i2c_adapter = state->muxc->adapter[0]; in lgdt3306a_probe() [all …]
|
A D | si2168_priv.h | 25 struct i2c_mux_core *muxc; member
|
A D | m88ds3103_priv.h | 42 struct i2c_mux_core *muxc; member
|
A D | m88ds3103.c | 1636 static int m88ds3103_select(struct i2c_mux_core *muxc, u32 chan) in m88ds3103_select() argument 1638 struct m88ds3103_dev *dev = i2c_mux_priv(muxc); in m88ds3103_select() 1760 return dev->muxc->adapter[0]; in m88ds3103_get_i2c_adapter() 1862 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in m88ds3103_probe() 1864 if (!dev->muxc) { in m88ds3103_probe() 1868 dev->muxc->priv = dev; in m88ds3103_probe() 1869 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in m88ds3103_probe() 1926 i2c_mux_del_adapters(dev->muxc); in m88ds3103_remove()
|
/linux-6.3-rc2/drivers/of/ |
A D | unittest.c | 2558 static int unittest_i2c_mux_select_chan(struct i2c_mux_core *muxc, u32 chan) in unittest_i2c_mux_select_chan() argument 2569 struct i2c_mux_core *muxc; in unittest_i2c_mux_probe() local 2592 muxc = i2c_mux_alloc(adap, dev, nchans, 0, 0, in unittest_i2c_mux_probe() 2594 if (!muxc) in unittest_i2c_mux_probe() 2597 if (i2c_mux_add_adapter(muxc, 0, i, 0)) { in unittest_i2c_mux_probe() 2599 i2c_mux_del_adapters(muxc); in unittest_i2c_mux_probe() 2604 i2c_set_clientdata(client, muxc); in unittest_i2c_mux_probe() 2613 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in unittest_i2c_mux_remove() local 2616 i2c_mux_del_adapters(muxc); in unittest_i2c_mux_remove()
|