/kernel/linux/linux-5.10/drivers/i2c/ |
D | i2c-mux.c | 35 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 = priv->muxc; in i2c_mux_master_xfer() local 63 struct i2c_adapter *parent = muxc->parent; in i2c_mux_master_xfer() 68 ret = muxc->select(muxc, priv->chan_id); in i2c_mux_master_xfer() 71 if (muxc->deselect) in i2c_mux_master_xfer() [all …]
|
/kernel/linux/linux-5.10/drivers/i2c/muxes/ |
D | i2c-mux-pinctrl.c | 22 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() 137 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-arb-gpio-challenge.c | 42 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() [all …]
|
D | i2c-mux-gpmux.c | 23 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->mux_locked = of_property_read_bool(np, "mux-locked"); in i2c_mux_probe() [all …]
|
D | i2c-mux-gpio.c | 34 static int i2c_mux_gpio_select(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_gpio_select() argument 36 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_select() 43 static int i2c_mux_gpio_deselect(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_gpio_deselect() argument 45 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_deselect() 109 struct i2c_mux_core *muxc; in i2c_mux_gpio_probe() local 140 muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, in i2c_mux_gpio_probe() 143 if (!muxc) { in i2c_mux_gpio_probe() 147 mux->gpios = muxc->priv; in i2c_mux_gpio_probe() 148 muxc->priv = mux; in i2c_mux_gpio_probe() 150 platform_set_drvdata(pdev, muxc); in i2c_mux_gpio_probe() [all …]
|
D | i2c-mux-pca954x.c | 234 static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan) in pca954x_select_chan() argument 236 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_select_chan() 244 ret = pca954x_reg_write(muxc->parent, client, regval); in pca954x_select_chan() 251 static int pca954x_deselect_mux(struct i2c_mux_core *muxc, u32 chan) in pca954x_deselect_mux() argument 253 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_deselect_mux() 260 return pca954x_select_chan(muxc, idle_state); in pca954x_deselect_mux() 265 return pca954x_reg_write(muxc->parent, client, in pca954x_deselect_mux() 279 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in idle_state_show() local 280 struct pca954x *data = i2c_mux_priv(muxc); in idle_state_show() 290 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in idle_state_store() local [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() 290 struct i2c_mux_core *muxc; in pca9541_probe() local 307 muxc = i2c_mux_alloc(adap, &client->dev, 1, sizeof(*data), in pca9541_probe() 310 if (!muxc) in pca9541_probe() 313 data = i2c_mux_priv(muxc); in pca9541_probe() [all …]
|
D | i2c-mux-reg.c | 61 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 201 muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, 0, 0, in i2c_mux_reg_probe() 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() [all …]
|
D | i2c-mux-ltc4306.c | 178 static int ltc4306_select_mux(struct i2c_mux_core *muxc, u32 chan) in ltc4306_select_mux() argument 180 struct ltc4306 *data = i2c_mux_priv(muxc); in ltc4306_select_mux() 186 static int ltc4306_deselect_mux(struct i2c_mux_core *muxc, u32 chan) in ltc4306_deselect_mux() argument 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() [all …]
|
/kernel/linux/linux-5.10/drivers/net/mdio/ |
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 ret = PTR_ERR(s->muxc); in mdio_mux_multiplexer_probe() 98 mux_control_deselect(s->muxc); in mdio_mux_multiplexer_remove()
|
/kernel/linux/linux-5.10/drivers/iio/imu/inv_mpu6050/ |
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()
|
D | inv_mpu_acpi.c | 172 mux_client = i2c_new_client_device(st->muxc->adapter[0], &info); in inv_mpu_acpi_create_mux_client()
|
/kernel/linux/linux-5.10/include/linux/ |
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);
|
/kernel/linux/linux-5.10/drivers/power/supply/ |
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() 344 data->muxc = i2c_mux_alloc(adapter, dev, SBSM_MAX_BATS, 0, in sbsm_probe() 346 if (!data->muxc) { in sbsm_probe() 351 data->muxc->priv = data; in sbsm_probe() 356 ret = i2c_mux_add_adapter(data->muxc, 0, i + 1, 0); in sbsm_probe() 398 i2c_mux_del_adapters(data->muxc); in sbsm_probe() 408 i2c_mux_del_adapters(data->muxc); in sbsm_remove()
|
/kernel/linux/linux-5.10/drivers/media/usb/cx231xx/ |
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()
|
/kernel/linux/linux-5.10/drivers/media/dvb-frontends/ |
D | si2168.c | 590 static int si2168_select(struct i2c_mux_core *muxc, u32 chan) in si2168_select() argument 592 struct i2c_client *client = i2c_mux_priv(muxc); in si2168_select() 608 static int si2168_deselect(struct i2c_mux_core *muxc, u32 chan) in si2168_deselect() argument 610 struct i2c_client *client = i2c_mux_priv(muxc); in si2168_deselect() 731 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, in si2168_probe() 734 if (!dev->muxc) { in si2168_probe() 738 dev->muxc->priv = client; in si2168_probe() 739 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in si2168_probe() 746 *config->i2c_adapter = dev->muxc->adapter[0]; in si2168_probe() 774 i2c_mux_del_adapters(dev->muxc); in si2168_remove()
|
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() 835 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in rtl2830_probe() 837 if (!dev->muxc) { in rtl2830_probe() 841 dev->muxc->priv = client; in rtl2830_probe() 842 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in rtl2830_probe() 874 i2c_mux_del_adapters(dev->muxc); in rtl2830_remove()
|
D | rtl2832.c | 799 static int rtl2832_select(struct i2c_mux_core *muxc, u32 chan_id) in rtl2832_select() argument 801 struct rtl2832_dev *dev = i2c_mux_priv(muxc); in rtl2832_select() 819 static int rtl2832_deselect(struct i2c_mux_core *muxc, u32 chan_id) in rtl2832_deselect() argument 821 struct rtl2832_dev *dev = i2c_mux_priv(muxc); in rtl2832_deselect() 893 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()
|
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() 1477 state->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in af9013_probe() 1479 if (!state->muxc) { in af9013_probe() 1483 state->muxc->priv = state; in af9013_probe() 1484 ret = i2c_mux_add_adapter(state->muxc, 0, 0, 0); in af9013_probe() [all …]
|
D | rtl2830_priv.h | 23 struct i2c_mux_core *muxc; member
|
D | si2168_priv.h | 26 struct i2c_mux_core *muxc; member
|
D | lgdt3306a.c | 73 struct i2c_mux_core *muxc; member 2192 static int lgdt3306a_select(struct i2c_mux_core *muxc, u32 chan) in lgdt3306a_select() argument 2194 struct i2c_client *client = i2c_mux_priv(muxc); in lgdt3306a_select() 2200 static int lgdt3306a_deselect(struct i2c_mux_core *muxc, u32 chan) in lgdt3306a_deselect() argument 2202 struct i2c_client *client = i2c_mux_priv(muxc); in lgdt3306a_deselect() 2235 state->muxc = i2c_mux_alloc(client->adapter, &client->dev, in lgdt3306a_probe() 2238 if (!state->muxc) { in lgdt3306a_probe() 2242 state->muxc->priv = client; in lgdt3306a_probe() 2243 ret = i2c_mux_add_adapter(state->muxc, 0, 0, 0); in lgdt3306a_probe() 2249 *config->i2c_adapter = state->muxc->adapter[0]; in lgdt3306a_probe() [all …]
|
D | m88ds3103_priv.h | 42 struct i2c_mux_core *muxc; member
|
D | m88ds3103.c | 1640 static int m88ds3103_select(struct i2c_mux_core *muxc, u32 chan) in m88ds3103_select() argument 1642 struct m88ds3103_dev *dev = i2c_mux_priv(muxc); in m88ds3103_select() 1764 return dev->muxc->adapter[0]; in m88ds3103_get_i2c_adapter() 1866 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in m88ds3103_probe() 1868 if (!dev->muxc) { in m88ds3103_probe() 1872 dev->muxc->priv = dev; in m88ds3103_probe() 1873 ret = i2c_mux_add_adapter(dev->muxc, 0, 0, 0); in m88ds3103_probe() 1930 i2c_mux_del_adapters(dev->muxc); in m88ds3103_remove()
|