/linux-6.1.9/drivers/clk/mediatek/ |
D | clk-mux.c | 35 struct mtk_clk_mux *mux = to_mtk_clk_mux(hw); in mtk_clk_mux_enable_setclr() local 38 if (mux->lock) in mtk_clk_mux_enable_setclr() 39 spin_lock_irqsave(mux->lock, flags); in mtk_clk_mux_enable_setclr() 41 __acquire(mux->lock); in mtk_clk_mux_enable_setclr() 43 regmap_write(mux->regmap, mux->data->clr_ofs, in mtk_clk_mux_enable_setclr() 44 BIT(mux->data->gate_shift)); in mtk_clk_mux_enable_setclr() 51 if (mux->reparent && mux->data->upd_shift >= 0) { in mtk_clk_mux_enable_setclr() 52 regmap_write(mux->regmap, mux->data->upd_ofs, in mtk_clk_mux_enable_setclr() 53 BIT(mux->data->upd_shift)); in mtk_clk_mux_enable_setclr() 54 mux->reparent = false; in mtk_clk_mux_enable_setclr() [all …]
|
D | clk-cpumux.c | 33 struct mtk_clk_cpumux *mux = to_mtk_clk_cpumux(hw); in clk_cpumux_get_parent() local 36 regmap_read(mux->regmap, mux->reg, &val); in clk_cpumux_get_parent() 38 val >>= mux->shift; in clk_cpumux_get_parent() 39 val &= mux->mask; in clk_cpumux_get_parent() 46 struct mtk_clk_cpumux *mux = to_mtk_clk_cpumux(hw); in clk_cpumux_set_parent() local 49 val = index << mux->shift; in clk_cpumux_set_parent() 50 mask = mux->mask << mux->shift; in clk_cpumux_set_parent() 52 return regmap_update_bits(mux->regmap, mux->reg, mask, val); in clk_cpumux_set_parent() 61 mtk_clk_register_cpumux(const struct mtk_composite *mux, in mtk_clk_register_cpumux() argument 72 init.name = mux->name; in mtk_clk_register_cpumux() [all …]
|
/linux-6.1.9/drivers/clk/ti/ |
D | mux.c | 23 struct clk_omap_mux *mux = to_clk_omap_mux(hw); in ti_clk_mux_get_parent() local 34 val = ti_clk_ll_ops->clk_readl(&mux->reg) >> mux->shift; in ti_clk_mux_get_parent() 35 val &= mux->mask; in ti_clk_mux_get_parent() 37 if (mux->table) { in ti_clk_mux_get_parent() 41 if (mux->table[i] == val) in ti_clk_mux_get_parent() 46 if (val && (mux->flags & CLK_MUX_INDEX_BIT)) in ti_clk_mux_get_parent() 49 if (val && (mux->flags & CLK_MUX_INDEX_ONE)) in ti_clk_mux_get_parent() 60 struct clk_omap_mux *mux = to_clk_omap_mux(hw); in ti_clk_mux_set_parent() local 63 if (mux->table) { in ti_clk_mux_set_parent() 64 index = mux->table[index]; in ti_clk_mux_set_parent() [all …]
|
/linux-6.1.9/drivers/i2c/muxes/ |
D | i2c-mux-reg.c | 23 static int i2c_mux_reg_set(const struct regmux *mux, unsigned int chan_id) in i2c_mux_reg_set() argument 25 if (!mux->data.reg) in i2c_mux_reg_set() 34 switch (mux->data.reg_size) { in i2c_mux_reg_set() 36 if (mux->data.little_endian) in i2c_mux_reg_set() 37 iowrite32(chan_id, mux->data.reg); in i2c_mux_reg_set() 39 iowrite32be(chan_id, mux->data.reg); in i2c_mux_reg_set() 40 if (!mux->data.write_only) in i2c_mux_reg_set() 41 ioread32(mux->data.reg); in i2c_mux_reg_set() 44 if (mux->data.little_endian) in i2c_mux_reg_set() 45 iowrite16(chan_id, mux->data.reg); in i2c_mux_reg_set() [all …]
|
D | i2c-mux-gpio.c | 26 static void i2c_mux_gpio_set(const struct gpiomux *mux, unsigned val) in i2c_mux_gpio_set() argument 32 gpiod_set_array_value_cansleep(mux->ngpios, mux->gpios, NULL, values); in i2c_mux_gpio_set() 37 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_select() local 39 i2c_mux_gpio_set(mux, chan); in i2c_mux_gpio_select() 46 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_deselect() local 48 i2c_mux_gpio_set(mux, mux->data.idle); in i2c_mux_gpio_deselect() 53 static int i2c_mux_gpio_probe_fw(struct gpiomux *mux, in i2c_mux_gpio_probe_fw() argument 90 mux->data.parent = i2c_adapter_id(adapter); in i2c_mux_gpio_probe_fw() 93 mux->data.n_values = device_get_child_node_count(dev); in i2c_mux_gpio_probe_fw() 95 mux->data.n_values, sizeof(*mux->data.values), in i2c_mux_gpio_probe_fw() [all …]
|
D | i2c-mux-gpmux.c | 17 struct mux { struct 25 struct mux *mux = i2c_mux_priv(muxc); in i2c_mux_select() local 28 ret = mux_control_select(mux->control, chan); in i2c_mux_select() 29 mux->do_not_deselect = ret < 0; in i2c_mux_select() 36 struct mux *mux = i2c_mux_priv(muxc); in i2c_mux_deselect() local 38 if (mux->do_not_deselect) in i2c_mux_deselect() 41 return mux_control_deselect(mux->control); in i2c_mux_deselect() 75 struct mux *mux; in i2c_mux_probe() local 83 mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL); in i2c_mux_probe() 84 if (!mux) in i2c_mux_probe() [all …]
|
/linux-6.1.9/drivers/iio/multiplexer/ |
D | iio-mux.c | 29 struct mux { struct 40 static int iio_mux_select(struct mux *mux, int idx) in iio_mux_select() argument 42 struct mux_child *child = &mux->child[idx]; in iio_mux_select() 43 struct iio_chan_spec const *chan = &mux->chan[idx]; in iio_mux_select() 47 ret = mux_control_select_delay(mux->control, chan->channel, in iio_mux_select() 48 mux->delay_us); 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() [all …]
|
/linux-6.1.9/Documentation/devicetree/bindings/mux/ |
D | mux-consumer.yaml | 4 $id: http://devicetree.org/schemas/mux/mux-consumer.yaml# 13 Mux controller consumers should specify a list of mux controllers that they 14 want to use with a property containing a 'mux-ctrl-list': 16 mux-ctrl-list ::= <single-mux-ctrl> [mux-ctrl-list] 17 single-mux-ctrl ::= <mux-ctrl-phandle> [mux-ctrl-specifier] 18 mux-ctrl-phandle : phandle to mux controller node 19 mux-ctrl-specifier : array of #mux-control-cells specifying the 20 given mux controller (controller specific) 22 Mux controller properties should be named "mux-controls". The exact meaning of 23 each mux controller property must be documented in the device tree binding for [all …]
|
D | mux-controller.yaml | 4 $id: http://devicetree.org/schemas/mux/mux-controller.yaml# 13 A multiplexer (or mux) controller will have one, or several, consumer devices 14 that uses the mux controller. Thus, a mux controller can possibly control 16 multiplexer needed by each consumer, but a single mux controller can of course 19 A mux controller provides a number of states to its consumers, and the state 28 specifier using the '#mux-control-cells' or '#mux-state-cells' property. 29 The value of '#mux-state-cells' will always be one greater than the value 30 of '#mux-control-cells'. 32 Optionally, mux controller nodes can also specify the state the mux should 34 idle-state is not present, the mux controller is typically left as is when [all …]
|
D | reg-mux.yaml | 4 $id: http://devicetree.org/schemas/mux/reg-mux.yaml# 19 - reg-mux # parent device of mux controller is not syscon device 20 - mmio-mux # parent device of mux controller is syscon device 24 '#mux-control-cells': 27 mux-reg-masks: 33 description: Each entry pair describes a single mux control. 39 - mux-reg-masks 40 - '#mux-control-cells' 46 /* The parent device of mux controller is not a syscon device. */ 48 #include <dt-bindings/mux/mux.h> [all …]
|
D | gpio-mux.yaml | 4 $id: http://devicetree.org/schemas/mux/gpio-mux.yaml# 22 const: gpio-mux 24 mux-gpios: 28 '#mux-control-cells': 31 '#mux-state-cells': 39 - mux-gpios 42 - "#mux-control-cells" 44 - "#mux-state-cells" 52 mux: mux-controller { 53 compatible = "gpio-mux"; [all …]
|
D | adi,adg792a.txt | 5 - #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.yaml 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 …]
|
/linux-6.1.9/drivers/clk/ |
D | clk-mux.c | 27 static inline u32 clk_mux_readl(struct clk_mux *mux) in clk_mux_readl() argument 29 if (mux->flags & CLK_MUX_BIG_ENDIAN) in clk_mux_readl() 30 return ioread32be(mux->reg); in clk_mux_readl() 32 return readl(mux->reg); in clk_mux_readl() 35 static inline void clk_mux_writel(struct clk_mux *mux, u32 val) in clk_mux_writel() argument 37 if (mux->flags & CLK_MUX_BIG_ENDIAN) in clk_mux_writel() 38 iowrite32be(val, mux->reg); in clk_mux_writel() 40 writel(val, mux->reg); in clk_mux_writel() 90 struct clk_mux *mux = to_clk_mux(hw); in clk_mux_get_parent() local 93 val = clk_mux_readl(mux) >> mux->shift; in clk_mux_get_parent() [all …]
|
/linux-6.1.9/drivers/mux/ |
D | core.c | 42 struct mux_control *mux; member 104 controllers * sizeof(*mux_chip->mux) + in mux_chip_alloc() 109 mux_chip->mux = (struct mux_control *)(mux_chip + 1); in mux_chip_alloc() 128 struct mux_control *mux = &mux_chip->mux[i]; in mux_chip_alloc() local 130 mux->chip = mux_chip; in mux_chip_alloc() 131 sema_init(&mux->lock, 1); in mux_chip_alloc() 132 mux->cached_state = MUX_CACHE_UNKNOWN; in mux_chip_alloc() 133 mux->idle_state = MUX_IDLE_AS_IS; in mux_chip_alloc() 134 mux->last_change = ktime_get(); in mux_chip_alloc() 143 static int mux_control_set(struct mux_control *mux, int state) in mux_control_set() argument [all …]
|
/linux-6.1.9/arch/arm/boot/dts/ |
D | nuvoton-wpcm450.dtsi | 154 smb3_pins: mux-smb3 { 159 smb4_pins: mux-smb4 { 164 smb5_pins: mux-smb5 { 169 scs1_pins: mux-scs1 { 174 scs2_pins: mux-scs2 { 179 scs3_pins: mux-scs3 { 184 smb0_pins: mux-smb0 { 189 smb1_pins: mux-smb1 { 194 smb2_pins: mux-smb2 { 199 bsp_pins: mux-bsp { [all …]
|
/linux-6.1.9/Documentation/devicetree/bindings/net/ |
D | mdio-mux-multiplexer.yaml | 4 $id: http://devicetree.org/schemas/net/mdio-mux-multiplexer.yaml# 13 This is a special case of MDIO mux when MDIO mux is defined as a consumer 14 of a mux producer device. The mux producer can be of any type like mmio mux 15 producer, gpio mux producer or generic register based mux producer. 19 - $ref: /schemas/net/mdio-mux.yaml# 23 const: mdio-mux-multiplexer 25 mux-controls: 30 - mux-controls 36 mux: mux-controller { // Mux Producer 37 compatible = "reg-mux"; [all …]
|
/linux-6.1.9/drivers/clk/qcom/ |
D | clk-krait.c | 23 static void __krait_mux_set_sel(struct krait_mux_clk *mux, int sel) in __krait_mux_set_sel() argument 30 regval = krait_get_l2_indirect_reg(mux->offset); in __krait_mux_set_sel() 33 if (mux->disable_sec_src_gating) { in __krait_mux_set_sel() 35 krait_set_l2_indirect_reg(mux->offset, regval); in __krait_mux_set_sel() 38 regval &= ~(mux->mask << mux->shift); in __krait_mux_set_sel() 39 regval |= (sel & mux->mask) << mux->shift; in __krait_mux_set_sel() 40 if (mux->lpl) { in __krait_mux_set_sel() 41 regval &= ~(mux->mask << (mux->shift + LPL_SHIFT)); in __krait_mux_set_sel() 42 regval |= (sel & mux->mask) << (mux->shift + LPL_SHIFT); in __krait_mux_set_sel() 44 krait_set_l2_indirect_reg(mux->offset, regval); in __krait_mux_set_sel() [all …]
|
D | krait-cc.c | 38 struct krait_mux_clk *mux = container_of(nb, struct krait_mux_clk, in krait_notifier_cb() local 42 mux->old_index = krait_mux_clk_ops.get_parent(&mux->hw); in krait_notifier_cb() 43 ret = krait_mux_clk_ops.set_parent(&mux->hw, mux->safe_sel); in krait_notifier_cb() 44 mux->reparent = false; in krait_notifier_cb() 51 if (!mux->reparent) in krait_notifier_cb() 52 ret = krait_mux_clk_ops.set_parent(&mux->hw, in krait_notifier_cb() 53 mux->old_index); in krait_notifier_cb() 60 struct krait_mux_clk *mux) in krait_notifier_register() argument 64 mux->clk_nb.notifier_call = krait_notifier_cb; in krait_notifier_register() 65 ret = clk_notifier_register(clk, &mux->clk_nb); in krait_notifier_register() [all …]
|
D | clk-regmap-mux.c | 20 struct clk_regmap_mux *mux = to_clk_regmap_mux(hw); in mux_get_parent() local 22 unsigned int mask = GENMASK(mux->width - 1, 0); in mux_get_parent() 25 regmap_read(clkr->regmap, mux->reg, &val); in mux_get_parent() 27 val >>= mux->shift; in mux_get_parent() 30 if (mux->parent_map) in mux_get_parent() 31 return qcom_find_cfg_index(hw, mux->parent_map, val); in mux_get_parent() 38 struct clk_regmap_mux *mux = to_clk_regmap_mux(hw); in mux_set_parent() local 40 unsigned int mask = GENMASK(mux->width + mux->shift - 1, mux->shift); in mux_set_parent() 43 if (mux->parent_map) in mux_set_parent() 44 index = mux->parent_map[index].cfg; in mux_set_parent() [all …]
|
/linux-6.1.9/drivers/clk/uniphier/ |
D | clk-uniphier-mux.c | 25 struct uniphier_clk_mux *mux = to_uniphier_clk_mux(hw); in uniphier_clk_mux_set_parent() local 27 return regmap_write_bits(mux->regmap, mux->reg, mux->masks[index], in uniphier_clk_mux_set_parent() 28 mux->vals[index]); in uniphier_clk_mux_set_parent() 33 struct uniphier_clk_mux *mux = to_uniphier_clk_mux(hw); in uniphier_clk_mux_get_parent() local 39 ret = regmap_read(mux->regmap, mux->reg, &val); in uniphier_clk_mux_get_parent() 44 if ((mux->masks[i] & val) == mux->vals[i]) in uniphier_clk_mux_get_parent() 61 struct uniphier_clk_mux *mux; in uniphier_clk_register_mux() local 65 mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL); in uniphier_clk_register_mux() 66 if (!mux) in uniphier_clk_register_mux() 75 mux->regmap = regmap; in uniphier_clk_register_mux() [all …]
|
/linux-6.1.9/net/kcm/ |
D | kcmsock.c | 58 struct kcm_mux *mux = psock->mux; in kcm_abort_tx_psock() local 62 spin_lock_bh(&mux->lock); in kcm_abort_tx_psock() 65 spin_unlock_bh(&mux->lock); in kcm_abort_tx_psock() 86 spin_unlock_bh(&mux->lock); in kcm_abort_tx_psock() 93 static void kcm_update_rx_mux_stats(struct kcm_mux *mux, in kcm_update_rx_mux_stats() argument 96 STRP_STATS_ADD(mux->stats.rx_bytes, in kcm_update_rx_mux_stats() 99 mux->stats.rx_msgs += in kcm_update_rx_mux_stats() 105 static void kcm_update_tx_mux_stats(struct kcm_mux *mux, in kcm_update_tx_mux_stats() argument 108 KCM_STATS_ADD(mux->stats.tx_bytes, in kcm_update_tx_mux_stats() 110 mux->stats.tx_msgs += in kcm_update_tx_mux_stats() [all …]
|
/linux-6.1.9/drivers/clk/imx/ |
D | clk-fixup-mux.c | 23 struct clk_mux mux; member 30 struct clk_mux *mux = to_clk_mux(hw); in to_clk_fixup_mux() local 32 return container_of(mux, struct clk_fixup_mux, mux); in to_clk_fixup_mux() 39 return fixup_mux->ops->get_parent(&fixup_mux->mux.hw); in clk_fixup_mux_get_parent() 45 struct clk_mux *mux = to_clk_mux(hw); in clk_fixup_mux_set_parent() local 49 spin_lock_irqsave(mux->lock, flags); in clk_fixup_mux_set_parent() 51 val = readl(mux->reg); in clk_fixup_mux_set_parent() 52 val &= ~(mux->mask << mux->shift); in clk_fixup_mux_set_parent() 53 val |= index << mux->shift; in clk_fixup_mux_set_parent() 55 writel(val, mux->reg); in clk_fixup_mux_set_parent() [all …]
|
/linux-6.1.9/drivers/clk/sprd/ |
D | mux.c | 15 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-6.1.9/arch/arm64/boot/dts/amlogic/ |
D | meson-gxl.dtsi | 156 reg-names = "mux", "pull", "gpio"; 163 mux { 171 mux { 180 mux { 188 mux { 196 mux { 205 mux { 213 mux { 222 mux { 230 mux { [all …]
|
D | meson-gxbb.dtsi | 98 reg-names = "mux", "pull", "gpio"; 105 mux { 113 mux { 122 mux { 130 mux { 139 mux { 147 mux { 156 mux { 164 mux { 172 mux { [all …]
|