/kernel/linux/linux-5.10/drivers/mux/ |
H A D | core.c | 52 struct mux_chip *mux_chip = to_mux_chip(dev); in mux_chip_release() local 54 ida_simple_remove(&mux_ida, mux_chip->id); in mux_chip_release() 55 kfree(mux_chip); in mux_chip_release() 71 * the number of valid mux states in the mux_chip->mux[N].states members and 72 * the desired idle state in the returned mux_chip->mux[N].idle_state members. 74 * provide a pointer to the operations struct in the mux_chip->ops member 79 struct mux_chip *mux_chip_alloc(struct device *dev, in mux_chip_alloc() 82 struct mux_chip *mux_chip; in mux_chip_alloc() local 147 mux_chip_register(struct mux_chip *mux_chip) mux_chip_register() argument 181 mux_chip_unregister(struct mux_chip *mux_chip) mux_chip_unregister() argument 193 mux_chip_free(struct mux_chip *mux_chip) mux_chip_free() argument 204 struct mux_chip *mux_chip = *(struct mux_chip **)res; devm_mux_chip_release() local 223 struct mux_chip **ptr, *mux_chip; devm_mux_chip_alloc() local 244 struct mux_chip *mux_chip = *(struct mux_chip **)res; devm_mux_chip_reg_release() local 258 devm_mux_chip_register(struct device *dev, struct mux_chip *mux_chip) devm_mux_chip_register() argument 429 struct mux_chip *mux_chip; mux_control_get() local [all...] |
H A D | gpio.c | 49 struct mux_chip *mux_chip; in mux_gpio_probe() local 59 mux_chip = devm_mux_chip_alloc(dev, 1, sizeof(*mux_gpio)); in mux_gpio_probe() 60 if (IS_ERR(mux_chip)) in mux_gpio_probe() 61 return PTR_ERR(mux_chip); in mux_gpio_probe() 63 mux_gpio = mux_chip_priv(mux_chip); in mux_gpio_probe() 64 mux_chip->ops = &mux_gpio_ops; in mux_gpio_probe() 74 mux_chip->mux->states = 1 << pins; in mux_gpio_probe() 78 if (idle_state < 0 || idle_state >= mux_chip->mux->states) { in mux_gpio_probe() 83 mux_chip in mux_gpio_probe() [all...] |
H A D | adg792a.c | 64 struct mux_chip *mux_chip; in adg792a_probe() local 79 mux_chip = devm_mux_chip_alloc(dev, cells ? 3 : 1, 0); in adg792a_probe() 80 if (IS_ERR(mux_chip)) in adg792a_probe() 81 return PTR_ERR(mux_chip); in adg792a_probe() 83 mux_chip->ops = &adg792a_ops; in adg792a_probe() 91 mux_chip->controllers); in adg792a_probe() 98 for (i = 0; i < mux_chip->controllers; ++i) { in adg792a_probe() 99 struct mux_control *mux = &mux_chip->mux[i]; in adg792a_probe() 115 ret = devm_mux_chip_register(dev, mux_chip); in adg792a_probe() [all...] |
H A D | mmio.c | 41 struct mux_chip *mux_chip; in mux_mmio_probe() local 67 mux_chip = devm_mux_chip_alloc(dev, num_fields, num_fields * in mux_mmio_probe() 69 if (IS_ERR(mux_chip)) in mux_mmio_probe() 70 return PTR_ERR(mux_chip); in mux_mmio_probe() 72 fields = mux_chip_priv(mux_chip); in mux_mmio_probe() 75 struct mux_control *mux = &mux_chip->mux[i]; in mux_mmio_probe() 126 mux_chip->ops = &mux_mmio_ops; in mux_mmio_probe() 128 return devm_mux_chip_register(dev, mux_chip); in mux_mmio_probe()
|
H A D | adgs1408.c | 57 struct mux_chip *mux_chip; in adgs1408_probe() local 66 mux_chip = devm_mux_chip_alloc(dev, 1, 0); in adgs1408_probe() 67 if (IS_ERR(mux_chip)) in adgs1408_probe() 68 return PTR_ERR(mux_chip); in adgs1408_probe() 70 mux_chip->ops = &adgs1408_ops; in adgs1408_probe() 80 mux = mux_chip->mux; in adgs1408_probe() 102 return devm_mux_chip_register(dev, mux_chip); in adgs1408_probe()
|
/kernel/linux/linux-6.6/drivers/mux/ |
H A D | core.c | 65 struct mux_chip *mux_chip = to_mux_chip(dev); in mux_chip_release() local 67 ida_simple_remove(&mux_ida, mux_chip->id); in mux_chip_release() 68 kfree(mux_chip); in mux_chip_release() 84 * the number of valid mux states in the mux_chip->mux[N].states members and 85 * the desired idle state in the returned mux_chip->mux[N].idle_state members. 87 * provide a pointer to the operations struct in the mux_chip->ops member 92 struct mux_chip *mux_chip_alloc(struct device *dev, in mux_chip_alloc() 95 struct mux_chip *mux_chip; in mux_chip_alloc() local 163 mux_chip_register(struct mux_chip *mux_chip) mux_chip_register() argument 197 mux_chip_unregister(struct mux_chip *mux_chip) mux_chip_unregister() argument 209 mux_chip_free(struct mux_chip *mux_chip) mux_chip_free() argument 220 struct mux_chip *mux_chip = *(struct mux_chip **)res; devm_mux_chip_release() local 239 struct mux_chip **ptr, *mux_chip; devm_mux_chip_alloc() local 260 struct mux_chip *mux_chip = *(struct mux_chip **)res; devm_mux_chip_reg_release() local 274 devm_mux_chip_register(struct device *dev, struct mux_chip *mux_chip) devm_mux_chip_register() argument 534 struct mux_chip *mux_chip; mux_get() local [all...] |
H A D | gpio.c | 51 struct mux_chip *mux_chip; in mux_gpio_probe() local 61 mux_chip = devm_mux_chip_alloc(dev, 1, sizeof(*mux_gpio)); in mux_gpio_probe() 62 if (IS_ERR(mux_chip)) in mux_gpio_probe() 63 return PTR_ERR(mux_chip); in mux_gpio_probe() 65 mux_gpio = mux_chip_priv(mux_chip); in mux_gpio_probe() 66 mux_chip->ops = &mux_gpio_ops; in mux_gpio_probe() 73 mux_chip->mux->states = BIT(pins); in mux_gpio_probe() 77 if (idle_state < 0 || idle_state >= mux_chip->mux->states) { in mux_gpio_probe() 82 mux_chip in mux_gpio_probe() [all...] |
H A D | adg792a.c | 64 struct mux_chip *mux_chip; in adg792a_probe() local 79 mux_chip = devm_mux_chip_alloc(dev, cells ? 3 : 1, 0); in adg792a_probe() 80 if (IS_ERR(mux_chip)) in adg792a_probe() 81 return PTR_ERR(mux_chip); in adg792a_probe() 83 mux_chip->ops = &adg792a_ops; in adg792a_probe() 91 mux_chip->controllers); in adg792a_probe() 98 for (i = 0; i < mux_chip->controllers; ++i) { in adg792a_probe() 99 struct mux_control *mux = &mux_chip->mux[i]; in adg792a_probe() 115 ret = devm_mux_chip_register(dev, mux_chip); in adg792a_probe() [all...] |
H A D | mmio.c | 41 struct mux_chip *mux_chip; in mux_mmio_probe() local 67 mux_chip = devm_mux_chip_alloc(dev, num_fields, num_fields * in mux_mmio_probe() 69 if (IS_ERR(mux_chip)) in mux_mmio_probe() 70 return PTR_ERR(mux_chip); in mux_mmio_probe() 72 fields = mux_chip_priv(mux_chip); in mux_mmio_probe() 75 struct mux_control *mux = &mux_chip->mux[i]; in mux_mmio_probe() 126 mux_chip->ops = &mux_mmio_ops; in mux_mmio_probe() 128 return devm_mux_chip_register(dev, mux_chip); in mux_mmio_probe()
|
H A D | adgs1408.c | 57 struct mux_chip *mux_chip; in adgs1408_probe() local 66 mux_chip = devm_mux_chip_alloc(dev, 1, 0); in adgs1408_probe() 67 if (IS_ERR(mux_chip)) in adgs1408_probe() 68 return PTR_ERR(mux_chip); in adgs1408_probe() 70 mux_chip->ops = &adgs1408_ops; in adgs1408_probe() 80 mux = mux_chip->mux; in adgs1408_probe() 102 return devm_mux_chip_register(dev, mux_chip); in adgs1408_probe()
|
/kernel/linux/linux-5.10/include/linux/mux/ |
H A D | driver.h | 17 struct mux_chip; 45 struct mux_chip *chip; 53 * struct mux_chip - Represents a chip holding mux controllers. 60 struct mux_chip { struct 69 #define to_mux_chip(x) container_of((x), struct mux_chip, dev) 73 * @mux_chip: The mux-chip to get the private memory from. 77 static inline void *mux_chip_priv(struct mux_chip *mux_chip) in mux_chip_priv() argument 79 return &mux_chip->mux[mux_chip in mux_chip_priv() [all...] |
/kernel/linux/linux-6.6/include/linux/mux/ |
H A D | driver.h | 18 struct mux_chip; 47 struct mux_chip *chip; 57 * struct mux_chip - Represents a chip holding mux controllers. 64 struct mux_chip { struct 73 #define to_mux_chip(x) container_of((x), struct mux_chip, dev) 77 * @mux_chip: The mux-chip to get the private memory from. 81 static inline void *mux_chip_priv(struct mux_chip *mux_chip) in mux_chip_priv() argument 83 return &mux_chip->mux[mux_chip in mux_chip_priv() [all...] |