Searched refs:mux_chip (Results 1 – 6 of 6) sorted by relevance
| /linux/drivers/mux/ |
| H A D | core.c | 65 struct mux_chip *mux_chip = to_mux_chip(dev); in mux_chip_release() local 67 ida_free(&mux_ida, mux_chip->id); in mux_chip_release() 68 kfree(mux_chip); in mux_chip_release() 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 101 mux_chip = kzalloc(size_add(struct_size(mux_chip, mux, controllers), in mux_chip_alloc() 104 if (!mux_chip) in mux_chip_alloc() 107 mux_chip->dev.class = &mux_class; in mux_chip_alloc() 108 mux_chip->dev.type = &mux_type; in mux_chip_alloc() 109 mux_chip->dev.parent = dev; in mux_chip_alloc() [all …]
|
| H A D | mmio.c | 60 struct mux_chip *mux_chip; in mux_mmio_probe() local 97 mux_chip = devm_mux_chip_alloc(dev, num_fields, sizeof(struct mux_mmio)); in mux_mmio_probe() 98 if (IS_ERR(mux_chip)) in mux_mmio_probe() 99 return PTR_ERR(mux_chip); in mux_mmio_probe() 101 mux_mmio = mux_chip_priv(mux_chip); in mux_mmio_probe() 113 struct mux_control *mux = &mux_chip->mux[i]; in mux_mmio_probe() 164 mux_chip->ops = &mux_mmio_ops; in mux_mmio_probe() 166 dev_set_drvdata(dev, mux_chip); in mux_mmio_probe() 168 return devm_mux_chip_register(dev, mux_chip); in mux_mmio_probe() 173 struct mux_chip *mux_chip = dev_get_drvdata(dev); in mux_mmio_suspend_noirq() local [all …]
|
| H A D | gpio.c | 50 struct mux_chip *mux_chip; in mux_gpio_probe() local 60 mux_chip = devm_mux_chip_alloc(dev, 1, sizeof(*mux_gpio)); in mux_gpio_probe() 61 if (IS_ERR(mux_chip)) in mux_gpio_probe() 62 return PTR_ERR(mux_chip); in mux_gpio_probe() 64 mux_gpio = mux_chip_priv(mux_chip); in mux_gpio_probe() 65 mux_chip->ops = &mux_gpio_ops; in mux_gpio_probe() 72 mux_chip->mux->states = BIT(pins); in mux_gpio_probe() 76 if (idle_state < 0 || idle_state >= mux_chip->mux->states) { in mux_gpio_probe() 81 mux_chip->mux->idle_state = idle_state; in mux_gpio_probe() 88 ret = devm_mux_chip_register(dev, 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()
|
| H A D | adgs1408.c | 57 struct mux_chip *mux_chip; in adgs1408_probe() local 64 mux_chip = devm_mux_chip_alloc(dev, 1, 0); in adgs1408_probe() 65 if (IS_ERR(mux_chip)) in adgs1408_probe() 66 return PTR_ERR(mux_chip); in adgs1408_probe() 68 mux_chip->ops = &adgs1408_ops; in adgs1408_probe() 78 mux = mux_chip->mux; in adgs1408_probe() 100 return devm_mux_chip_register(dev, mux_chip); in adgs1408_probe()
|
| /linux/include/linux/mux/ |
| H A D | driver.h | 18 struct mux_chip; 47 struct mux_chip *chip; 64 struct mux_chip { struct 73 #define to_mux_chip(x) container_of((x), struct mux_chip, dev) argument 81 static inline void *mux_chip_priv(struct mux_chip *mux_chip) in mux_chip_priv() argument 83 return &mux_chip->mux[mux_chip->controllers]; in mux_chip_priv() 86 struct mux_chip *mux_chip_alloc(struct device *dev, 88 int mux_chip_register(struct mux_chip *mux_chip); 89 void mux_chip_unregister(struct mux_chip *mux_chip); 90 void mux_chip_free(struct mux_chip *mux_chip); [all …]
|