/linux-6.12.1/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 …]
|
/linux-6.12.1/drivers/i2c/muxes/ |
D | i2c-mux-mule.c | 23 static int mule_i2c_mux_select(struct i2c_mux_core *muxc, u32 dev) in mule_i2c_mux_select() argument 25 struct mule_i2c_reg_mux *mux = muxc->priv; in mule_i2c_mux_select() 30 static int mule_i2c_mux_deselect(struct i2c_mux_core *muxc, u32 dev) in mule_i2c_mux_deselect() argument 32 return mule_i2c_mux_select(muxc, MULE_I2C_MUX_DEFAULT_DEV); in mule_i2c_mux_deselect() 37 struct i2c_mux_core *muxc = data; in mule_i2c_mux_remove() local 39 i2c_mux_del_adapters(muxc); in mule_i2c_mux_remove() 41 mule_i2c_mux_deselect(muxc, MULE_I2C_MUX_DEFAULT_DEV); in mule_i2c_mux_remove() 49 struct i2c_mux_core *muxc; in mule_i2c_mux_probe() local 61 muxc = i2c_mux_alloc(client->adapter, mux_dev, ndev, sizeof(*priv), in mule_i2c_mux_probe() 63 if (!muxc) in mule_i2c_mux_probe() [all …]
|
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 | 88 static int mlxcpld_mux_select_chan(struct i2c_mux_core *muxc, u32 chan) in mlxcpld_mux_select_chan() argument 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() 106 static int mlxcpld_mux_deselect(struct i2c_mux_core *muxc, u32 chan) in mlxcpld_mux_deselect() argument 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 143 muxc = i2c_mux_alloc(client->adapter, &pdev->dev, pdata->num_adaps, in mlxcpld_mux_probe() 146 if (!muxc) in mlxcpld_mux_probe() 149 platform_set_drvdata(pdev, 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 | 35 static int i2c_mux_gpio_select(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_gpio_select() argument 37 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_select() 47 static int i2c_mux_gpio_deselect(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_gpio_deselect() argument 49 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_deselect() 130 struct i2c_mux_core *muxc; in i2c_mux_gpio_probe() local 161 muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, in i2c_mux_gpio_probe() 164 if (!muxc) { in i2c_mux_gpio_probe() 168 mux->gpios = muxc->priv; in i2c_mux_gpio_probe() 169 muxc->priv = mux; in i2c_mux_gpio_probe() 171 platform_set_drvdata(pdev, muxc); in i2c_mux_gpio_probe() [all …]
|
D | i2c-mux-pca954x.c | 319 static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan) in pca954x_select_chan() argument 321 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_select_chan() 329 ret = pca954x_reg_write(muxc->parent, client, regval); in pca954x_select_chan() 336 static int pca954x_deselect_mux(struct i2c_mux_core *muxc, u32 chan) in pca954x_deselect_mux() argument 338 struct pca954x *data = i2c_mux_priv(muxc); in pca954x_deselect_mux() 345 return pca954x_select_chan(muxc, idle_state); in pca954x_deselect_mux() 350 return pca954x_reg_write(muxc->parent, client, in pca954x_deselect_mux() 364 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in idle_state_show() local 365 struct pca954x *data = i2c_mux_priv(muxc); in idle_state_show() 375 struct i2c_mux_core *muxc = i2c_get_clientdata(client); in idle_state_store() local [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 200 muxc = i2c_mux_alloc(parent, &pdev->dev, mux->data.n_values, 0, 0, in i2c_mux_reg_probe() 202 if (!muxc) { in i2c_mux_reg_probe() 206 muxc->priv = mux; in i2c_mux_reg_probe() 208 platform_set_drvdata(pdev, muxc); in i2c_mux_reg_probe() 211 muxc->deselect = i2c_mux_reg_deselect; in i2c_mux_reg_probe() [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() 289 struct i2c_mux_core *muxc; in pca9541_probe() local 306 muxc = i2c_mux_alloc(adap, &client->dev, 1, sizeof(*data), in pca9541_probe() 309 if (!muxc) in pca9541_probe() 312 data = i2c_mux_priv(muxc); in pca9541_probe() [all …]
|
D | i2c-mux-ltc4306.c | 177 static int ltc4306_select_mux(struct i2c_mux_core *muxc, u32 chan) in ltc4306_select_mux() argument 179 struct ltc4306 *data = i2c_mux_priv(muxc); in ltc4306_select_mux() 185 static int ltc4306_deselect_mux(struct i2c_mux_core *muxc, u32 chan) in ltc4306_deselect_mux() argument 187 struct ltc4306 *data = i2c_mux_priv(muxc); in ltc4306_deselect_mux() 211 struct i2c_mux_core *muxc; in ltc4306_probe() local 226 muxc = i2c_mux_alloc(adap, &client->dev, in ltc4306_probe() 230 if (!muxc) in ltc4306_probe() 232 data = i2c_mux_priv(muxc); in ltc4306_probe() 235 i2c_set_clientdata(client, muxc); in ltc4306_probe() 282 ret = i2c_mux_add_adapter(muxc, 0, num); in ltc4306_probe() [all …]
|
/linux-6.12.1/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 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.12.1/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 139 st->muxc = i2c_mux_alloc(client->adapter, &client->dev, in inv_mpu_probe() 142 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); in inv_mpu_probe() 156 i2c_mux_del_adapters(st->muxc); in inv_mpu_probe() 165 if (st->muxc) { in inv_mpu_remove() 167 i2c_mux_del_adapters(st->muxc); in inv_mpu_remove()
|
/linux-6.12.1/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, 61 void i2c_mux_del_adapters(struct i2c_mux_core *muxc);
|
/linux-6.12.1/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() 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); in sbsm_probe()
|
/linux-6.12.1/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, 0, mux_no); in cx231xx_i2c_mux_register() 575 i2c_mux_del_adapters(dev->muxc); in cx231xx_i2c_mux_unregister() 588 return dev->muxc->adapter[0]; in cx231xx_get_i2c_adap() 590 return dev->muxc->adapter[1]; in cx231xx_get_i2c_adap()
|
/linux-6.12.1/drivers/media/dvb-frontends/ |
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); in si2168_probe() 754 *config->i2c_adapter = dev->muxc->adapter[0]; in si2168_probe() 782 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() 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); in rtl2830_probe() 873 i2c_mux_del_adapters(dev->muxc); in rtl2830_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() 1476 state->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in af9013_probe() 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); in af9013_probe() [all …]
|
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); in rtl2832_probe() 1120 i2c_mux_del_adapters(dev->muxc); in rtl2832_remove()
|
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() 2203 state->muxc = i2c_mux_alloc(client->adapter, &client->dev, in lgdt3306a_probe() 2206 if (!state->muxc) { in lgdt3306a_probe() 2210 state->muxc->priv = client; in lgdt3306a_probe() 2211 ret = i2c_mux_add_adapter(state->muxc, 0, 0); in lgdt3306a_probe() 2217 *config->i2c_adapter = state->muxc->adapter[0]; in lgdt3306a_probe() [all …]
|
D | rtl2830_priv.h | 23 struct i2c_mux_core *muxc; member
|
D | si2168_priv.h | 25 struct i2c_mux_core *muxc; member
|
D | m88ds3103_priv.h | 42 struct i2c_mux_core *muxc; member
|
D | m88ds3103.c | 1643 static int m88ds3103_select(struct i2c_mux_core *muxc, u32 chan) in m88ds3103_select() argument 1645 struct m88ds3103_dev *dev = i2c_mux_priv(muxc); in m88ds3103_select() 1767 return dev->muxc->adapter[0]; in m88ds3103_get_i2c_adapter() 1869 dev->muxc = i2c_mux_alloc(client->adapter, &client->dev, 1, 0, 0, in m88ds3103_probe() 1871 if (!dev->muxc) { in m88ds3103_probe() 1875 dev->muxc->priv = dev; in m88ds3103_probe() 1876 ret = i2c_mux_add_adapter(dev->muxc, 0, 0); in m88ds3103_probe() 1919 i2c_mux_del_adapters(dev->muxc); in m88ds3103_probe() 1935 i2c_mux_del_adapters(dev->muxc); in m88ds3103_remove()
|