Home
last modified time | relevance | path

Searched refs:mux (Results 1 – 25 of 708) sorted by relevance

12345678910>>...29

/Linux-v4.19/drivers/clk/ti/
Dmux.c31 struct clk_omap_mux *mux = to_clk_omap_mux(hw); in ti_clk_mux_get_parent() local
42 val = ti_clk_ll_ops->clk_readl(&mux->reg) >> mux->shift; in ti_clk_mux_get_parent()
43 val &= mux->mask; in ti_clk_mux_get_parent()
45 if (mux->table) { in ti_clk_mux_get_parent()
49 if (mux->table[i] == val) in ti_clk_mux_get_parent()
54 if (val && (mux->flags & CLK_MUX_INDEX_BIT)) in ti_clk_mux_get_parent()
57 if (val && (mux->flags & CLK_MUX_INDEX_ONE)) in ti_clk_mux_get_parent()
68 struct clk_omap_mux *mux = to_clk_omap_mux(hw); in ti_clk_mux_set_parent() local
71 if (mux->table) { in ti_clk_mux_set_parent()
72 index = mux->table[index]; in ti_clk_mux_set_parent()
[all …]
/Linux-v4.19/drivers/i2c/muxes/
Di2c-mux-reg.c27 static int i2c_mux_reg_set(const struct regmux *mux, unsigned int chan_id) in i2c_mux_reg_set() argument
29 if (!mux->data.reg) in i2c_mux_reg_set()
38 switch (mux->data.reg_size) { in i2c_mux_reg_set()
40 if (mux->data.little_endian) in i2c_mux_reg_set()
41 iowrite32(chan_id, mux->data.reg); in i2c_mux_reg_set()
43 iowrite32be(chan_id, mux->data.reg); in i2c_mux_reg_set()
44 if (!mux->data.write_only) in i2c_mux_reg_set()
45 ioread32(mux->data.reg); in i2c_mux_reg_set()
48 if (mux->data.little_endian) in i2c_mux_reg_set()
49 iowrite16(chan_id, mux->data.reg); in i2c_mux_reg_set()
[all …]
Di2c-mux-gpio.c28 static void i2c_mux_gpio_set(const struct gpiomux *mux, unsigned val) in i2c_mux_gpio_set() argument
32 for (i = 0; i < mux->data.n_gpios; i++) in i2c_mux_gpio_set()
33 mux->values[i] = (val >> i) & 1; in i2c_mux_gpio_set()
35 gpiod_set_array_value_cansleep(mux->data.n_gpios, in i2c_mux_gpio_set()
36 mux->gpios, mux->values); in i2c_mux_gpio_set()
41 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_select() local
43 i2c_mux_gpio_set(mux, chan); in i2c_mux_gpio_select()
50 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_deselect() local
52 i2c_mux_gpio_set(mux, mux->data.idle); in i2c_mux_gpio_deselect()
64 static int i2c_mux_gpio_probe_dt(struct gpiomux *mux, in i2c_mux_gpio_probe_dt() argument
[all …]
Di2c-mux-gpmux.c20 struct mux { struct
28 struct mux *mux = i2c_mux_priv(muxc); in i2c_mux_select() argument
31 ret = mux_control_select(mux->control, chan); in i2c_mux_select()
32 mux->do_not_deselect = ret < 0; in i2c_mux_select()
39 struct mux *mux = i2c_mux_priv(muxc); in i2c_mux_deselect() local
41 if (mux->do_not_deselect) in i2c_mux_deselect()
44 return mux_control_deselect(mux->control); in i2c_mux_deselect()
78 struct mux *mux; in i2c_mux_probe() local
86 mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL); in i2c_mux_probe()
87 if (!mux) in i2c_mux_probe()
[all …]
/Linux-v4.19/drivers/iio/multiplexer/
Diio-mux.c31 struct mux { struct
41 static int iio_mux_select(struct mux *mux, int idx) in iio_mux_select() argument
43 struct mux_child *child = &mux->child[idx]; in iio_mux_select()
44 struct iio_chan_spec const *chan = &mux->chan[idx]; in iio_mux_select()
48 ret = mux_control_select(mux->control, chan->channel); in iio_mux_select()
50 mux->cached_state = -1; in iio_mux_select()
54 if (mux->cached_state == chan->channel) in iio_mux_select()
67 ret = iio_write_channel_ext_info(mux->parent, attr, in iio_mux_select()
72 mux_control_deselect(mux->control); in iio_mux_select()
73 mux->cached_state = -1; in iio_mux_select()
[all …]
/Linux-v4.19/Documentation/devicetree/bindings/mux/
Dmux-controller.txt4 A multiplexer (or mux) controller will have one, or several, consumer devices
5 that uses the mux controller. Thus, a mux controller can possibly control
7 multiplexer needed by each consumer, but a single mux controller can of course
10 A mux controller provides a number of states to its consumers, and the state
18 Mux controller consumers should specify a list of mux controllers that they
19 want to use with a property containing a 'mux-ctrl-list':
21 mux-ctrl-list ::= <single-mux-ctrl> [mux-ctrl-list]
22 single-mux-ctrl ::= <mux-ctrl-phandle> [mux-ctrl-specifier]
23 mux-ctrl-phandle : phandle to mux controller node
24 mux-ctrl-specifier : array of #mux-control-cells specifying the
[all …]
Dadi,adg792a.txt5 - #mux-control-cells : <0> if parallel (the three muxes are bound together
6 with a single mux controller controlling all three muxes), or <1> if
7 not (one mux controller for each mux).
8 * Standard mux-controller bindings as described in mux-controller.txt
18 - idle-state : if present, array of states that the mux controllers will have
27 * Three independent mux controllers (of which one is used).
28 * Mux 0 is disconnected when idle, mux 1 idles in the previously
29 * selected state and mux 2 idles with signal B.
32 mux: mux-controller@50 {
35 #mux-control-cells = <1>;
[all …]
Dgpio-mux.txt7 - compatible : "gpio-mux"
8 - mux-gpios : list of gpios used to control the multiplexer, least
10 - #mux-control-cells : <0>
11 * Standard mux-controller bindings as decribed in mux-controller.txt
14 - idle-state : if present, the state the mux will have when idle. The
23 mux: mux-controller {
24 compatible = "gpio-mux";
25 #mux-control-cells = <0>;
27 mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>,
31 adc-mux {
[all …]
Dmmio-mux.txt7 - compatible : "mmio-mux"
8 - #mux-control-cells : <1>
9 - mux-reg-masks : an array of register offset and pre-shifted bitfield mask
10 pairs, each describing a single mux control.
11 * Standard mux-controller bindings as decribed in mux-controller.txt
19 in the mux-reg-masks array, accessed through the parent syscon.
26 mux: mux-controller {
27 compatible = "mmio-mux";
28 #mux-control-cells = <1>;
30 mux-reg-masks = <0x3 0x30>, /* 0: reg 0x3, bits 5:4 */
[all …]
/Linux-v4.19/drivers/mux/
Dcore.c89 controllers * sizeof(*mux_chip->mux) + in mux_chip_alloc()
94 mux_chip->mux = (struct mux_control *)(mux_chip + 1); in mux_chip_alloc()
113 struct mux_control *mux = &mux_chip->mux[i]; in mux_chip_alloc() local
115 mux->chip = mux_chip; in mux_chip_alloc()
116 sema_init(&mux->lock, 1); in mux_chip_alloc()
117 mux->cached_state = MUX_CACHE_UNKNOWN; in mux_chip_alloc()
118 mux->idle_state = MUX_IDLE_AS_IS; in mux_chip_alloc()
127 static int mux_control_set(struct mux_control *mux, int state) in mux_control_set() argument
129 int ret = mux->chip->ops->set(mux, state); in mux_control_set()
131 mux->cached_state = ret < 0 ? MUX_CACHE_UNKNOWN : state; in mux_control_set()
[all …]
/Linux-v4.19/drivers/clk/
Dclk-mux.c76 struct clk_mux *mux = to_clk_mux(hw); in clk_mux_get_parent() local
79 val = clk_readl(mux->reg) >> mux->shift; in clk_mux_get_parent()
80 val &= mux->mask; in clk_mux_get_parent()
82 return clk_mux_val_to_index(hw, mux->table, mux->flags, val); in clk_mux_get_parent()
87 struct clk_mux *mux = to_clk_mux(hw); in clk_mux_set_parent() local
88 u32 val = clk_mux_index_to_val(mux->table, mux->flags, index); in clk_mux_set_parent()
92 if (mux->lock) in clk_mux_set_parent()
93 spin_lock_irqsave(mux->lock, flags); in clk_mux_set_parent()
95 __acquire(mux->lock); in clk_mux_set_parent()
97 if (mux->flags & CLK_MUX_HIWORD_MASK) { in clk_mux_set_parent()
[all …]
/Linux-v4.19/drivers/clk/mediatek/
Dclk-cpumux.c29 struct mtk_clk_cpumux *mux = to_mtk_clk_cpumux(hw); in clk_cpumux_get_parent() local
32 regmap_read(mux->regmap, mux->reg, &val); in clk_cpumux_get_parent()
34 val >>= mux->shift; in clk_cpumux_get_parent()
35 val &= mux->mask; in clk_cpumux_get_parent()
42 struct mtk_clk_cpumux *mux = to_mtk_clk_cpumux(hw); in clk_cpumux_set_parent() local
45 val = index << mux->shift; in clk_cpumux_set_parent()
46 mask = mux->mask << mux->shift; in clk_cpumux_set_parent()
48 return regmap_update_bits(mux->regmap, mux->reg, mask, val); in clk_cpumux_set_parent()
57 mtk_clk_register_cpumux(const struct mtk_composite *mux, in mtk_clk_register_cpumux() argument
68 init.name = mux->name; in mtk_clk_register_cpumux()
[all …]
/Linux-v4.19/drivers/clk/uniphier/
Dclk-uniphier-mux.c34 struct uniphier_clk_mux *mux = to_uniphier_clk_mux(hw); in uniphier_clk_mux_set_parent() local
36 return regmap_write_bits(mux->regmap, mux->reg, mux->masks[index], in uniphier_clk_mux_set_parent()
37 mux->vals[index]); in uniphier_clk_mux_set_parent()
42 struct uniphier_clk_mux *mux = to_uniphier_clk_mux(hw); in uniphier_clk_mux_get_parent() local
48 ret = regmap_read(mux->regmap, mux->reg, &val); in uniphier_clk_mux_get_parent()
53 if ((mux->masks[i] & val) == mux->vals[i]) in uniphier_clk_mux_get_parent()
70 struct uniphier_clk_mux *mux; in uniphier_clk_register_mux() local
74 mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL); in uniphier_clk_register_mux()
75 if (!mux) in uniphier_clk_register_mux()
84 mux->regmap = regmap; in uniphier_clk_register_mux()
[all …]
/Linux-v4.19/drivers/clk/imx/
Dclk-fixup-mux.c28 struct clk_mux mux; member
35 struct clk_mux *mux = to_clk_mux(hw); in to_clk_fixup_mux() local
37 return container_of(mux, struct clk_fixup_mux, mux); in to_clk_fixup_mux()
44 return fixup_mux->ops->get_parent(&fixup_mux->mux.hw); in clk_fixup_mux_get_parent()
50 struct clk_mux *mux = to_clk_mux(hw); in clk_fixup_mux_set_parent() local
54 spin_lock_irqsave(mux->lock, flags); in clk_fixup_mux_set_parent()
56 val = readl(mux->reg); in clk_fixup_mux_set_parent()
57 val &= ~(mux->mask << mux->shift); in clk_fixup_mux_set_parent()
58 val |= index << mux->shift; in clk_fixup_mux_set_parent()
60 writel(val, mux->reg); in clk_fixup_mux_set_parent()
[all …]
/Linux-v4.19/net/kcm/
Dkcmsock.c60 struct kcm_mux *mux = psock->mux; in kcm_abort_tx_psock() local
64 spin_lock_bh(&mux->lock); in kcm_abort_tx_psock()
67 spin_unlock_bh(&mux->lock); in kcm_abort_tx_psock()
88 spin_unlock_bh(&mux->lock); in kcm_abort_tx_psock()
95 static void kcm_update_rx_mux_stats(struct kcm_mux *mux, in kcm_update_rx_mux_stats() argument
98 STRP_STATS_ADD(mux->stats.rx_bytes, in kcm_update_rx_mux_stats()
101 mux->stats.rx_msgs += in kcm_update_rx_mux_stats()
107 static void kcm_update_tx_mux_stats(struct kcm_mux *mux, in kcm_update_tx_mux_stats() argument
110 KCM_STATS_ADD(mux->stats.tx_bytes, in kcm_update_tx_mux_stats()
112 mux->stats.tx_msgs += in kcm_update_tx_mux_stats()
[all …]
/Linux-v4.19/arch/arm64/boot/dts/amlogic/
Dmeson-gxl.dtsi105 reg-names = "mux", "pull", "gpio";
112 mux {
119 mux {
127 mux {
134 mux {
141 mux {
149 mux {
156 mux {
164 mux {
171 mux {
[all …]
Dmeson-gxbb.dtsi74 reg-names = "mux", "pull", "gpio";
81 mux {
88 mux {
96 mux {
103 mux {
111 mux {
118 mux {
126 mux {
133 mux {
140 mux {
[all …]
Dmeson-axg.dtsi538 reg-names = "mux", "pull", "pull-enable", "gpio";
545 mux {
562 mux {
573 mux {
585 mux {
596 mux {
611 mux {
626 mux {
646 mux {
666 mux {
[all …]
/Linux-v4.19/Documentation/devicetree/bindings/iio/multiplexer/
Dio-channel-mux.txt7 - compatible : "io-channel-mux"
13 - mux-controls : Mux controller node to use for operating the mux
14 - channels : List of strings, labeling the mux controller states.
18 the list of strings in the channels property, and also matches the mux
19 controller state. The mux controller state is described in
20 ../mux/mux-controller.txt
23 mux: mux-controller {
24 compatible = "mux-gpio";
25 #mux-control-cells = <0>;
27 mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>,
[all …]
/Linux-v4.19/drivers/clk/qcom/
Dclk-regmap-mux.c28 struct clk_regmap_mux *mux = to_clk_regmap_mux(hw); in mux_get_parent() local
30 unsigned int mask = GENMASK(mux->width - 1, 0); in mux_get_parent()
33 regmap_read(clkr->regmap, mux->reg, &val); in mux_get_parent()
35 val >>= mux->shift; in mux_get_parent()
38 if (mux->parent_map) in mux_get_parent()
39 return qcom_find_src_index(hw, mux->parent_map, val); in mux_get_parent()
46 struct clk_regmap_mux *mux = to_clk_regmap_mux(hw); in mux_set_parent() local
48 unsigned int mask = GENMASK(mux->width + mux->shift - 1, mux->shift); in mux_set_parent()
51 if (mux->parent_map) in mux_set_parent()
52 index = mux->parent_map[index].cfg; in mux_set_parent()
[all …]
/Linux-v4.19/drivers/usb/typec/
Dmux.c115 struct typec_mux *mux; in typec_mux_match() local
117 list_for_each_entry(mux, &mux_list, entry) in typec_mux_match()
118 if (!strcmp(con->endpoint[ep], dev_name(mux->dev))) in typec_mux_match()
119 return mux; in typec_mux_match()
140 struct typec_mux *mux; in typec_mux_get() local
143 mux = device_connection_find_match(dev, name, NULL, typec_mux_match); in typec_mux_get()
144 if (!IS_ERR_OR_NULL(mux)) { in typec_mux_get()
145 WARN_ON(!try_module_get(mux->dev->driver->owner)); in typec_mux_get()
146 get_device(mux->dev); in typec_mux_get()
150 return mux; in typec_mux_get()
[all …]
/Linux-v4.19/drivers/clk/sprd/
Dmux.c15 const struct sprd_mux_ssel *mux) in sprd_mux_helper_get_parent() argument
23 parent = reg >> mux->shift; in sprd_mux_helper_get_parent()
24 parent &= (1 << mux->width) - 1; in sprd_mux_helper_get_parent()
26 if (!mux->table) in sprd_mux_helper_get_parent()
32 if (parent >= mux->table[i] && parent < mux->table[i + 1]) in sprd_mux_helper_get_parent()
43 return sprd_mux_helper_get_parent(&cm->common, &cm->mux); in sprd_mux_get_parent()
47 const struct sprd_mux_ssel *mux, in sprd_mux_helper_set_parent() argument
52 if (mux->table) in sprd_mux_helper_set_parent()
53 index = mux->table[index]; in sprd_mux_helper_set_parent()
56 reg &= ~GENMASK(mux->width + mux->shift - 1, mux->shift); in sprd_mux_helper_set_parent()
[all …]
/Linux-v4.19/Documentation/devicetree/bindings/i2c/
Di2c-mux-gpmux.txt3 This binding describes an I2C bus multiplexer that uses a mux controller
4 from the mux subsystem to route the I2C signals.
21 - compatible: i2c-mux
24 - mux-controls: The phandle of the mux controller to use for operating the
25 mux.
26 * Standard I2C mux properties. See i2c-mux.txt in this directory.
27 * I2C child bus nodes. See i2c-mux.txt in this directory. The sub-bus number
28 is also the mux-controller state described in ../mux/mux-controller.txt
31 - mux-locked: If present, explicitly allow unrelated I2C transactions on the
41 If mux-locked is not present, the multiplexer is assumed to be parent-locked.
[all …]
/Linux-v4.19/drivers/clk/tegra/
Dclk-super.c44 struct tegra_clk_super_mux *mux = to_clk_super_mux(hw); in clk_super_get_parent() local
48 val = readl_relaxed(mux->reg); in clk_super_get_parent()
55 super_state_to_src_shift(mux, SUPER_STATE_IDLE) : in clk_super_get_parent()
56 super_state_to_src_shift(mux, SUPER_STATE_RUN); in clk_super_get_parent()
58 source = (val >> shift) & super_state_to_src_mask(mux); in clk_super_get_parent()
64 if ((mux->flags & TEGRA_DIVIDER_2) && !(val & SUPER_LP_DIV2_BYPASS) && in clk_super_get_parent()
65 (source == mux->pllx_index)) in clk_super_get_parent()
66 source = mux->div2_index; in clk_super_get_parent()
73 struct tegra_clk_super_mux *mux = to_clk_super_mux(hw); in clk_super_set_parent() local
79 if (mux->lock) in clk_super_set_parent()
[all …]
/Linux-v4.19/Documentation/i2c/
Di2c-topology7 1. A mux may be needed on the bus to prevent address collisions.
21 i2c transfers, and all adapters with a parent are part of an "i2c-mux"
24 Depending of the particular mux driver, something happens when there is
25 an i2c transfer on one of its child adapters. The mux driver can
26 obviously operate a mux, but it can also do arbitration with an external
27 bus master or open a gate. The mux driver has two operations for this,
36 mux-locked or parent-locked muxes. As is evident from below, it can be
37 useful to know if a mux is mux-locked or if it is parent-locked. The
42 i2c-mux-gpio Normally parent-locked, mux-locked iff
44 same i2c root adapter that they mux.
[all …]

12345678910>>...29