Searched refs:mux (Results 1 - 25 of 395) sorted by relevance

1234567891011>>

/linux-master/drivers/iio/multiplexer/
H A DMakefile7 obj-$(CONFIG_IIO_MUX) += iio-mux.o
H A Diio-mux.c16 #include <linux/mux/consumer.h>
29 struct mux { struct
40 static int iio_mux_select(struct mux *mux, int idx) argument
42 struct mux_child *child = &mux->child[idx];
43 struct iio_chan_spec const *chan = &mux->chan[idx];
47 ret = mux_control_select_delay(mux->control, chan->channel,
48 mux->delay_us);
50 mux->cached_state = -1;
54 if (mux
83 iio_mux_deselect(struct mux *mux) argument
92 struct mux *mux = iio_priv(indio_dev); local
123 struct mux *mux = iio_priv(indio_dev); local
150 struct mux *mux = iio_priv(indio_dev); local
181 struct mux *mux = iio_priv(indio_dev); local
203 struct mux *mux = iio_priv(indio_dev); local
241 mux_configure_channel(struct device *dev, struct mux *mux, u32 state, const char *label, int idx) argument
333 struct mux *mux; local
[all...]
/linux-master/drivers/mux/
H A DMakefile6 mux-core-objs := core.o
7 mux-adg792a-objs := adg792a.o
8 mux-adgs1408-objs := adgs1408.o
9 mux-gpio-objs := gpio.o
10 mux-mmio-objs := mmio.o
12 obj-$(CONFIG_MULTIPLEXER) += mux-core.o
13 obj-$(CONFIG_MUX_ADG792A) += mux-adg792a.o
14 obj-$(CONFIG_MUX_ADGS1408) += mux-adgs1408.o
15 obj-$(CONFIG_MUX_GPIO) += mux-gpio.o
16 obj-$(CONFIG_MUX_MMIO) += mux
[all...]
H A Dcore.c10 #define pr_fmt(fmt) "mux-core: " fmt
19 #include <linux/mux/consumer.h>
20 #include <linux/mux/driver.h>
32 * struct mux_state - Represents a mux controller state specific to a given
34 * @mux: Pointer to a mux controller.
35 * @state: State of the mux to be selected.
41 struct mux_control *mux; member in struct:mux_state
46 .name = "mux",
72 .name = "mux
126 struct mux_control *mux = &mux_chip->mux[i]; local
141 mux_control_set(struct mux_control *mux, int state) argument
169 struct mux_control *mux = &mux_chip->mux[i]; local
303 mux_control_states(struct mux_control *mux) argument
312 __mux_control_select(struct mux_control *mux, int state) argument
333 mux_control_delay(struct mux_control *mux, unsigned int delay_us) argument
366 mux_control_select_delay(struct mux_control *mux, unsigned int state, unsigned int delay_us) argument
426 mux_control_try_select_delay(struct mux_control *mux, unsigned int state, unsigned int delay_us) argument
478 mux_control_deselect(struct mux_control *mux) argument
631 mux_control_put(struct mux_control *mux) argument
639 struct mux_control *mux = *(struct mux_control **)res; local
655 struct mux_control **ptr, *mux; local
[all...]
/linux-master/drivers/i2c/muxes/
H A Di2c-mux-reg.c10 #include <linux/i2c-mux.h>
15 #include <linux/platform_data/i2c-mux-reg.h>
23 static int i2c_mux_reg_set(const struct regmux *mux, unsigned int chan_id) argument
25 if (!mux->data.reg)
34 switch (mux->data.reg_size) {
36 if (mux->data.little_endian)
37 iowrite32(chan_id, mux->data.reg);
39 iowrite32be(chan_id, mux->data.reg);
40 if (!mux->data.write_only)
41 ioread32(mux
63 struct regmux *mux = i2c_mux_priv(muxc); local
70 struct regmux *mux = i2c_mux_priv(muxc); local
79 i2c_mux_reg_probe_dt(struct regmux *mux, struct platform_device *pdev) argument
149 i2c_mux_reg_probe_dt(struct regmux *mux, struct platform_device *pdev) argument
159 struct regmux *mux; local
[all...]
H A DMakefile9 obj-$(CONFIG_I2C_MUX_GPIO) += i2c-mux-gpio.o
10 obj-$(CONFIG_I2C_MUX_GPMUX) += i2c-mux-gpmux.o
11 obj-$(CONFIG_I2C_MUX_LTC4306) += i2c-mux-ltc4306.o
12 obj-$(CONFIG_I2C_MUX_MLXCPLD) += i2c-mux-mlxcpld.o
13 obj-$(CONFIG_I2C_MUX_PCA9541) += i2c-mux-pca9541.o
14 obj-$(CONFIG_I2C_MUX_PCA954x) += i2c-mux-pca954x.o
15 obj-$(CONFIG_I2C_MUX_PINCTRL) += i2c-mux-pinctrl.o
16 obj-$(CONFIG_I2C_MUX_REG) += i2c-mux-reg.o
H A Di2c-mux-gpio.c9 #include <linux/i2c-mux.h>
11 #include <linux/platform_data/i2c-mux-gpio.h>
25 static void i2c_mux_gpio_set(const struct gpiomux *mux, unsigned int val) argument
31 gpiod_set_array_value_cansleep(mux->ngpios, mux->gpios, NULL, values);
36 struct gpiomux *mux = i2c_mux_priv(muxc); local
38 i2c_mux_gpio_set(mux, chan);
45 struct gpiomux *mux = i2c_mux_priv(muxc); local
47 i2c_mux_gpio_set(mux, mux
52 i2c_mux_gpio_probe_fw(struct gpiomux *mux, struct platform_device *pdev) argument
125 struct gpiomux *mux; local
[all...]
H A Di2c-mux-gpmux.c11 #include <linux/i2c-mux.h>
13 #include <linux/mux/consumer.h>
17 struct mux { struct
25 struct mux *mux = i2c_mux_priv(muxc); local
28 ret = mux_control_select(mux->control, chan);
29 mux->do_not_deselect = ret < 0;
36 struct mux *mux = i2c_mux_priv(muxc); local
38 if (mux
75 struct mux *mux; local
[all...]
/linux-master/drivers/clk/ti/
H A Dmux.c23 struct clk_omap_mux *mux = to_clk_omap_mux(hw); local
28 * FIXME need a mux-specific flag to determine if val is bitwise or
34 val = ti_clk_ll_ops->clk_readl(&mux->reg) >> mux->shift;
35 val &= mux->mask;
37 if (mux->table) {
41 if (mux->table[i] == val)
46 if (val && (mux->flags & CLK_MUX_INDEX_BIT))
49 if (val && (mux->flags & CLK_MUX_INDEX_ONE))
60 struct clk_omap_mux *mux local
94 struct clk_omap_mux *mux = to_clk_omap_mux(hw); local
108 struct clk_omap_mux *mux = to_clk_omap_mux(hw); local
127 struct clk_omap_mux *mux; local
224 struct clk_omap_mux *mux; local
253 struct clk_omap_mux *mux; local
[all...]
/linux-master/drivers/clk/uniphier/
H A Dclk-uniphier-mux.c25 struct uniphier_clk_mux *mux = to_uniphier_clk_mux(hw); local
27 return regmap_write_bits(mux->regmap, mux->reg, mux->masks[index],
28 mux->vals[index]);
33 struct uniphier_clk_mux *mux = to_uniphier_clk_mux(hw); local
39 ret = regmap_read(mux->regmap, mux->reg, &val);
44 if ((mux->masks[i] & val) == mux
61 struct uniphier_clk_mux *mux; local
[all...]
/linux-master/drivers/clk/mediatek/
H A Dclk-mux.c18 #include "clk-mux.h"
35 struct mtk_clk_mux *mux = to_mtk_clk_mux(hw); local
38 if (mux->lock)
39 spin_lock_irqsave(mux->lock, flags);
41 __acquire(mux->lock);
43 regmap_write(mux->regmap, mux->data->clr_ofs,
44 BIT(mux->data->gate_shift));
48 * not be effective yet. Set the update bit to ensure the mux gets
51 if (mux
67 struct mtk_clk_mux *mux = to_mtk_clk_mux(hw); local
75 struct mtk_clk_mux *mux = to_mtk_clk_mux(hw); local
85 struct mtk_clk_mux *mux = to_mtk_clk_mux(hw); local
108 struct mtk_clk_mux *mux = to_mtk_clk_mux(hw); local
149 struct mtk_clk_mux *mux = to_mtk_clk_mux(hw); local
171 mtk_clk_register_mux(struct device *dev, const struct mtk_mux *mux, struct regmap *regmap, spinlock_t *lock) argument
206 struct mtk_clk_mux *mux; local
233 const struct mtk_mux *mux = &muxes[i]; local
256 const struct mtk_mux *mux = &muxes[i]; local
278 const struct mtk_mux *mux = &muxes[i - 1]; local
[all...]
H A Dclk-cpumux.c33 struct mtk_clk_cpumux *mux = to_mtk_clk_cpumux(hw); local
36 regmap_read(mux->regmap, mux->reg, &val);
38 val >>= mux->shift;
39 val &= mux->mask;
46 struct mtk_clk_cpumux *mux = to_mtk_clk_cpumux(hw); local
49 val = index << mux->shift;
50 mask = mux->mask << mux->shift;
52 return regmap_update_bits(mux
62 mtk_clk_register_cpumux(struct device *dev, const struct mtk_composite *mux, struct regmap *regmap) argument
121 const struct mtk_composite *mux = &clks[i]; local
143 const struct mtk_composite *mux = &clks[i]; local
162 const struct mtk_composite *mux = &clks[i - 1]; local
[all...]
/linux-master/drivers/clk/qcom/
H A Dclk-regmap-mux.c11 #include "clk-regmap-mux.h"
20 struct clk_regmap_mux *mux = to_clk_regmap_mux(hw); local
22 unsigned int mask = GENMASK(mux->width - 1, 0);
25 regmap_read(clkr->regmap, mux->reg, &val);
27 val >>= mux->shift;
30 if (mux->parent_map)
31 return qcom_find_cfg_index(hw, mux->parent_map, val);
38 struct clk_regmap_mux *mux = to_clk_regmap_mux(hw); local
40 unsigned int mask = GENMASK(mux->width + mux
[all...]
H A Dclk-krait.c23 static void __krait_mux_set_sel(struct krait_mux_clk *mux, int sel) argument
30 regval = krait_get_l2_indirect_reg(mux->offset);
33 if (mux->disable_sec_src_gating) {
35 krait_set_l2_indirect_reg(mux->offset, regval);
38 regval &= ~(mux->mask << mux->shift);
39 regval |= (sel & mux->mask) << mux->shift;
40 if (mux->lpl) {
41 regval &= ~(mux
65 struct krait_mux_clk *mux = to_krait_mux_clk(hw); local
81 struct krait_mux_clk *mux = to_krait_mux_clk(hw); local
[all...]
/linux-master/drivers/clk/
H A Dclk-mux.c27 static inline u32 clk_mux_readl(struct clk_mux *mux) argument
29 if (mux->flags & CLK_MUX_BIG_ENDIAN)
30 return ioread32be(mux->reg);
32 return readl(mux->reg);
35 static inline void clk_mux_writel(struct clk_mux *mux, u32 val) argument
37 if (mux->flags & CLK_MUX_BIG_ENDIAN)
38 iowrite32be(val, mux->reg);
40 writel(val, mux->reg);
90 struct clk_mux *mux = to_clk_mux(hw); local
93 val = clk_mux_readl(mux) >> mu
101 struct clk_mux *mux = to_clk_mux(hw); local
132 struct clk_mux *mux = to_clk_mux(hw); local
157 struct clk_mux *mux; local
262 struct clk_mux *mux; local
278 struct clk_mux *mux; local
[all...]
/linux-master/include/linux/dma/
H A Dqcom_adm.h9 u32 mux; member in struct:qcom_adm_peripheral_config
/linux-master/drivers/clk/sprd/
H A Dmux.c12 #include "mux.h"
15 const struct sprd_mux_ssel *mux)
23 parent = reg >> mux->shift;
24 parent &= (1 << mux->width) - 1;
26 if (!mux->table)
32 if (parent >= mux->table[i] && parent < mux->table[i + 1])
43 return sprd_mux_helper_get_parent(&cm->common, &cm->mux);
47 const struct sprd_mux_ssel *mux,
52 if (mux
14 sprd_mux_helper_get_parent(const struct sprd_clk_common *common, const struct sprd_mux_ssel *mux) argument
46 sprd_mux_helper_set_parent(const struct sprd_clk_common *common, const struct sprd_mux_ssel *mux, u8 index) argument
[all...]
/linux-master/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_ring_mux.c43 static inline struct amdgpu_mux_entry *amdgpu_ring_mux_sw_entry(struct amdgpu_ring_mux *mux, argument
46 return ring->entry_index < mux->ring_entry_size ?
47 &mux->ring_entry[ring->entry_index] : NULL;
51 static void amdgpu_ring_mux_copy_pkt_from_sw_ring(struct amdgpu_ring_mux *mux, argument
56 struct amdgpu_ring *real_ring = mux->real_ring;
76 static void amdgpu_mux_resubmit_chunks(struct amdgpu_ring_mux *mux) argument
84 if (!mux->s_resubmit)
87 for (i = 0; i < mux->num_ring_entries; i++) {
88 if (mux->ring_entry[i].ring->hw_prio <= AMDGPU_RING_PRIO_DEFAULT) {
89 e = &mux
131 amdgpu_ring_mux_schedule_resubmit(struct amdgpu_ring_mux *mux) argument
138 struct amdgpu_ring_mux *mux = from_timer(mux, t, resubmit_timer); local
149 amdgpu_ring_mux_init(struct amdgpu_ring_mux *mux, struct amdgpu_ring *ring, unsigned int entry_size) argument
174 amdgpu_ring_mux_fini(struct amdgpu_ring_mux *mux) argument
194 amdgpu_ring_mux_add_sw_ring(struct amdgpu_ring_mux *mux, struct amdgpu_ring *ring) argument
212 amdgpu_ring_mux_set_wptr(struct amdgpu_ring_mux *mux, struct amdgpu_ring *ring, u64 wptr) argument
252 amdgpu_ring_mux_get_wptr(struct amdgpu_ring_mux *mux, struct amdgpu_ring *ring) argument
281 amdgpu_ring_mux_get_rptr(struct amdgpu_ring_mux *mux, struct amdgpu_ring *ring) argument
318 struct amdgpu_ring_mux *mux = &adev->gfx.muxer; local
327 struct amdgpu_ring_mux *mux = &adev->gfx.muxer; local
336 struct amdgpu_ring_mux *mux = &adev->gfx.muxer; local
361 amdgpu_mcbp_scan(struct amdgpu_ring_mux *mux) argument
381 amdgpu_mcbp_trigger_preempt(struct amdgpu_ring_mux *mux) argument
395 struct amdgpu_ring_mux *mux = &adev->gfx.muxer; local
410 struct amdgpu_ring_mux *mux = &adev->gfx.muxer; local
421 struct amdgpu_ring_mux *mux = &adev->gfx.muxer; local
432 amdgpu_ring_mux_start_ib(struct amdgpu_ring_mux *mux, struct amdgpu_ring *ring) argument
461 scan_and_remove_signaled_chunk(struct amdgpu_ring_mux *mux, struct amdgpu_ring *ring) argument
483 amdgpu_ring_mux_ib_mark_offset(struct amdgpu_ring_mux *mux, struct amdgpu_ring *ring, u64 offset, enum amdgpu_ring_mux_offset_type type) argument
518 amdgpu_ring_mux_end_ib(struct amdgpu_ring_mux *mux, struct amdgpu_ring *ring) argument
541 amdgpu_mcbp_handle_trailing_fence_irq(struct amdgpu_ring_mux *mux) argument
[all...]
/linux-master/drivers/clk/imx/
H A Dclk-fixup-mux.c15 * @mux: the parent class
23 struct clk_mux mux; member in struct:clk_fixup_mux
30 struct clk_mux *mux = to_clk_mux(hw); local
32 return container_of(mux, struct clk_fixup_mux, mux);
39 return fixup_mux->ops->get_parent(&fixup_mux->mux.hw);
45 struct clk_mux *mux = to_clk_mux(hw); local
49 spin_lock_irqsave(mux->lock, flags);
51 val = readl(mux->reg);
52 val &= ~(mux
[all...]
/linux-master/drivers/clk/sunxi/
H A Dclk-a10-mod1.c24 struct clk_mux *mux; local
35 mux = kzalloc(sizeof(*mux), GFP_KERNEL);
36 if (!mux)
49 mux->reg = reg;
50 mux->shift = SUN4I_MOD1_MUX;
51 mux->mask = BIT(SUN4I_MOD1_MUX_WIDTH) - 1;
52 mux->lock = &mod1_lock;
55 &mux->hw, &clk_mux_ops,
68 kfree(mux);
[all...]
H A Dclk-a20-gmac.c56 struct clk_mux *mux; local
65 /* allocate mux and gate clock structs */
66 mux = kzalloc(sizeof(struct clk_mux), GFP_KERNEL);
67 if (!mux)
86 mux->reg = reg;
87 mux->mask = SUN7I_A20_GMAC_MASK;
88 mux->table = sun7i_a20_gmac_mux_table;
89 mux->lock = &gmac_lock;
93 &mux->hw, &clk_mux_ops,
110 kfree(mux);
[all...]
/linux-master/include/linux/mux/
H A Ddriver.h3 * mux/driver.h - definitions for the multiplexer driver interface
13 #include <dt-bindings/mux/mux.h>
22 * struct mux_control_ops - Mux controller operations for a mux chip.
23 * @set: Set the state of the given mux controller.
26 int (*set)(struct mux_control *mux, int state);
30 * struct mux_control - Represents a mux controller.
31 * @lock: Protects the mux controller state.
32 * @chip: The mux chip that is handling this mux controlle
66 struct mux_control *mux; member in struct:mux_chip
104 mux_control_get_index(struct mux_control *mux) argument
[all...]
H A Dconsumer.h3 * mux/consumer.h - definitions for the multiplexer consumer interface
19 unsigned int mux_control_states(struct mux_control *mux);
20 int __must_check mux_control_select_delay(struct mux_control *mux,
25 int __must_check mux_control_try_select_delay(struct mux_control *mux,
31 static inline int __must_check mux_control_select(struct mux_control *mux, argument
34 return mux_control_select_delay(mux, state, 0);
42 static inline int __must_check mux_control_try_select(struct mux_control *mux, argument
45 return mux_control_try_select_delay(mux, state, 0);
53 int mux_control_deselect(struct mux_control *mux);
57 void mux_control_put(struct mux_control *mux);
[all...]
/linux-master/drivers/clk/rockchip/
H A Dclk-muxgrf.c23 struct rockchip_muxgrf_clock *mux = to_muxgrf_clock(hw); local
24 unsigned int mask = GENMASK(mux->width - 1, 0);
27 regmap_read(mux->regmap, mux->reg, &val);
29 val >>= mux->shift;
37 struct rockchip_muxgrf_clock *mux = to_muxgrf_clock(hw); local
38 unsigned int mask = GENMASK(mux->width + mux->shift - 1, mux->shift);
42 val <<= mux
[all...]
/linux-master/include/linux/usb/
H A Dtypec_mux.h51 typedef int (*typec_mux_set_fn_t)(struct typec_mux_dev *mux,
64 void typec_mux_put(struct typec_mux *mux);
65 int typec_mux_set(struct typec_mux *mux, struct typec_mux_state *state);
69 void typec_mux_unregister(struct typec_mux_dev *mux);
71 void typec_mux_set_drvdata(struct typec_mux_dev *mux, void *data);
72 void *typec_mux_get_drvdata(struct typec_mux_dev *mux);
81 static inline void typec_mux_put(struct typec_mux *mux) {} argument
83 static inline int typec_mux_set(struct typec_mux *mux, struct typec_mux_state *state) argument
93 static inline void typec_mux_unregister(struct typec_mux_dev *mux) {} argument
95 static inline void typec_mux_set_drvdata(struct typec_mux_dev *mux, voi argument
96 typec_mux_get_drvdata(struct typec_mux_dev *mux) argument
[all...]

Completed in 245 milliseconds

1234567891011>>