| /linux/drivers/clk/mediatek/ |
| A D | clk-mux.c | 38 if (mux->lock) in mtk_clk_mux_enable_setclr() 43 regmap_write(mux->regmap, mux->data->clr_ofs, 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() 69 regmap_write(mux->regmap, mux->data->set_ofs, in mtk_clk_mux_disable_setclr() 78 regmap_read(mux->regmap, mux->data->mux_ofs, &val); in mtk_clk_mux_is_enabled() 89 regmap_read(mux->regmap, mux->data->mux_ofs, &val); in mtk_clk_mux_get_parent() 121 regmap_read(mux->regmap, mux->data->mux_ofs, &orig); in mtk_clk_mux_set_parent_setclr_lock() 126 regmap_write(mux->regmap, mux->data->clr_ofs, in mtk_clk_mux_set_parent_setclr_lock() 128 regmap_write(mux->regmap, mux->data->set_ofs, in mtk_clk_mux_set_parent_setclr_lock() [all …]
|
| A D | clk-cpumux.c | 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() 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() 73 init.name = mux->name; in mtk_clk_register_cpumux() 77 init.flags = mux->flags; in mtk_clk_register_cpumux() 79 cpumux->reg = mux->mux_reg; in mtk_clk_register_cpumux() 125 node, mux->id); in mtk_clk_register_cpumuxes() [all …]
|
| /linux/drivers/clk/ti/ |
| A D | mux.c | 34 val = ti_clk_ll_ops->clk_readl(&mux->reg) >> mux->shift; in ti_clk_mux_get_parent() 74 val = mux->mask << (mux->shift + 16); in ti_clk_mux_set_parent() 77 val &= ~(mux->mask << mux->shift); in ti_clk_mux_set_parent() 81 ti_clk_latch(&mux->reg, mux->latch); in ti_clk_mux_set_parent() 132 mux = kzalloc(sizeof(*mux), GFP_KERNEL); in _register_mux() 133 if (!mux) in _register_mux() 230 mux = kzalloc(sizeof(*mux), GFP_KERNEL); in ti_clk_build_component_mux() 246 mux->mask = (1 << fls(mux->mask)) - 1; in ti_clk_build_component_mux() 256 mux = kzalloc(sizeof(*mux), GFP_KERNEL); in of_ti_composite_mux_clk_setup() 263 mux->shift = mux->reg.bit; in of_ti_composite_mux_clk_setup() [all …]
|
| /linux/drivers/gpu/drm/amd/amdgpu/ |
| A D | amdgpu_ring_mux.c | 84 if (!mux->s_resubmit) in amdgpu_mux_resubmit_chunks() 138 struct amdgpu_ring_mux *mux = from_timer(mux, t, resubmit_timer); in amdgpu_mux_resubmit_fallback() local 152 mux->real_ring = ring; in amdgpu_ring_mux_init() 156 if (!mux->ring_entry) in amdgpu_ring_mux_init() 188 kfree(mux->ring_entry); in amdgpu_ring_mux_fini() 189 mux->ring_entry = NULL; in amdgpu_ring_mux_fini() 198 if (mux->num_ring_entries >= mux->ring_entry_size) { in amdgpu_ring_mux_add_sw_ring() 203 e = &mux->ring_entry[mux->num_ring_entries]; in amdgpu_ring_mux_add_sw_ring() 216 spin_lock(&mux->lock); in amdgpu_ring_mux_set_wptr() 385 spin_lock(&mux->lock); in amdgpu_mcbp_trigger_preempt() [all …]
|
| /linux/drivers/i2c/muxes/ |
| A D | i2c-mux-reg.c | 25 if (!mux->data.reg) in i2c_mux_reg_set() 73 return i2c_mux_reg_set(mux, mux->data.idle); in i2c_mux_reg_deselect() 124 mux->data.n_values, sizeof(*mux->data.values), in i2c_mux_reg_probe_dt() 159 struct regmux *mux; in i2c_mux_reg_probe() local 164 mux = devm_kzalloc(&pdev->dev, sizeof(*mux), GFP_KERNEL); in i2c_mux_reg_probe() 165 if (!mux) in i2c_mux_reg_probe() 170 sizeof(mux->data)); in i2c_mux_reg_probe() 182 if (!mux->data.reg) { in i2c_mux_reg_probe() 193 if (mux->data.reg_size != 4 && mux->data.reg_size != 2 && in i2c_mux_reg_probe() 206 muxc->priv = mux; in i2c_mux_reg_probe() [all …]
|
| A D | i2c-mux-gpio.c | 32 gpiod_set_array_value_cansleep(mux->ngpios, mux->gpios, NULL, values); in i2c_mux_gpio_set() 41 if (mux->data.settle_time) in i2c_mux_gpio_select() 51 i2c_mux_gpio_set(mux, mux->data.idle); in i2c_mux_gpio_deselect() 98 mux->data.n_values, sizeof(*mux->data.values), in i2c_mux_gpio_probe_fw() 131 struct gpiomux *mux; in i2c_mux_gpio_probe() local 137 mux = devm_kzalloc(&pdev->dev, sizeof(*mux), GFP_KERNEL); in i2c_mux_gpio_probe() 138 if (!mux) in i2c_mux_gpio_probe() 147 sizeof(mux->data)); in i2c_mux_gpio_probe() 155 mux->ngpios = ngpios; in i2c_mux_gpio_probe() 169 muxc->priv = mux; in i2c_mux_gpio_probe() [all …]
|
| /linux/drivers/iio/multiplexer/ |
| A D | iio-mux.c | 29 struct mux { struct 39 static int iio_mux_select(struct mux *mux, int idx) in iio_mux_select() argument 82 static void iio_mux_deselect(struct mux *mux) in iio_mux_deselect() argument 91 struct mux *mux = iio_priv(indio_dev); in mux_read_raw() local 122 struct mux *mux = iio_priv(indio_dev); in mux_read_avail() local 149 struct mux *mux = iio_priv(indio_dev); in mux_write_raw() local 180 struct mux *mux = iio_priv(indio_dev); in mux_read_ext_info() local 202 struct mux *mux = iio_priv(indio_dev); in mux_write_ext_info() local 332 struct mux *mux; in mux_probe() local 385 mux->child = (struct mux_child *)(mux + 1); in mux_probe() [all …]
|
| /linux/Documentation/devicetree/bindings/mux/ |
| A D | mux-consumer.yaml | 4 $id: http://devicetree.org/schemas/mux/mux-consumer.yaml# 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 36 "mux-controls" can be used. If the consumer needs to set the mux 46 mux-controls: 49 mux-states: 52 mux-control-names: 58 mux-state-names: [all …]
|
| A D | mux-controller.yaml | 4 $id: http://devicetree.org/schemas/mux/mux-controller.yaml# 14 that uses the mux controller. Thus, a mux controller can possibly control 28 specifier using the '#mux-control-cells' or '#mux-state-cells' property. 50 #include <dt-bindings/mux/mux.h> 57 mux: mux-controller@50 { 82 '#mux-state-cells': 117 mux: mux-controller { 124 adc-mux { 129 mux-controls = <&mux>; 150 adc-mux { [all …]
|
| A 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 27 mux-reg-masks: 39 - mux-reg-masks 48 #include <dt-bindings/mux/mux.h> 50 mux-controller { 58 mdio-mux-1 { 78 mdio-mux-2 { 101 #include <dt-bindings/mux/mux.h> [all …]
|
| A 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 52 mux: mux-controller { 60 adc-mux { 65 mux-controls = <&mux>; 70 i2c-mux { [all …]
|
| A D | adi,adg792a.txt | 7 not (one mux controller for each mux). 8 * Standard mux-controller bindings as described in mux-controller.yaml 32 mux: mux-controller@50 { 35 #mux-control-cells = <1>; 41 adc-mux { 42 compatible = "io-channel-mux"; 46 mux-controls = <&mux 2>; 58 pmux: mux-controller@50 { 61 #mux-control-cells = <0>; 67 diff-adc-mux { [all …]
|
| /linux/drivers/clk/ |
| A D | clk-mux.c | 93 val = clk_mux_readl(mux) >> mux->shift; in clk_mux_get_parent() 96 return clk_mux_val_to_index(hw, mux->table, mux->flags, val); in clk_mux_get_parent() 106 if (mux->lock) in clk_mux_set_parent() 112 reg = mux->mask << (mux->shift + 16); in clk_mux_set_parent() 115 reg &= ~(mux->mask << mux->shift); in clk_mux_set_parent() 121 if (mux->lock) in clk_mux_set_parent() 172 mux = kzalloc(sizeof(*mux), GFP_KERNEL); in __clk_hw_register_mux() 173 if (!mux) in __clk_hw_register_mux() 202 kfree(mux); in __clk_hw_register_mux() 272 kfree(mux); in clk_unregister_mux() [all …]
|
| /linux/drivers/mux/ |
| A D | core.c | 126 struct mux_control *mux = &mux_chip->mux[i]; in mux_chip_alloc() local 143 int ret = mux->chip->ops->set(mux, state); in mux_control_set() 169 struct mux_control *mux = &mux_chip->mux[i]; in mux_chip_register() local 171 if (mux->idle_state == mux->cached_state) in mux_chip_register() 174 ret = mux_control_set(mux, mux->idle_state); in mux_chip_register() 328 mux_control_set(mux, mux->idle_state); in __mux_control_select() 483 mux->idle_state != mux->cached_state) in mux_control_deselect() 484 ret = mux_control_set(mux, mux->idle_state); in mux_control_deselect() 664 return mux; in devm_mux_control_get() 667 *ptr = mux; in devm_mux_control_get() [all …]
|
| /linux/arch/arm/boot/dts/nuvoton/ |
| A D | nuvoton-wpcm450.dtsi | 217 bsp_pins: mux-bsp { 277 smi_pins: mux-smi { 317 fi0_pins: mux-fi0 { 322 fi1_pins: mux-fi1 { 327 fi2_pins: mux-fi2 { 332 fi3_pins: mux-fi3 { 337 fi4_pins: mux-fi4 { 342 fi5_pins: mux-fi5 { 347 fi6_pins: mux-fi6 { 352 fi7_pins: mux-fi7 { [all …]
|
| /linux/Documentation/devicetree/bindings/net/ |
| A D | 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. 23 const: mdio-mux-multiplexer 25 mux-controls: 30 - mux-controls 36 mux: mux-controller { // Mux Producer 37 compatible = "reg-mux"; 43 mdio-mux-1 { // Mux consumer 45 mux-controls = <&mux 0>; [all …]
|
| /linux/drivers/clk/qcom/ |
| A D | clk-krait.c | 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() 69 mux->en_mask = sel; in krait_mux_set_parent() 72 __krait_mux_set_sel(mux, sel); in krait_mux_set_parent() 74 mux->reparent = true; in krait_mux_set_parent() 85 sel >>= mux->shift; in krait_mux_get_parent() 86 sel &= mux->mask; in krait_mux_get_parent() [all …]
|
| A D | krait-cc.c | 52 mux->old_index = krait_mux_clk_ops.get_parent(&mux->hw); in krait_notifier_cb() 53 ret = krait_mux_clk_ops.set_parent(&mux->hw, mux->safe_sel); in krait_notifier_cb() 162 mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL); in krait_add_sec_mux() 163 if (!mux) in krait_add_sec_mux() 169 mux->shift = 2; in krait_add_sec_mux() 204 clk = &mux->hw; in krait_add_sec_mux() 206 ret = krait_notifier_register(dev, mux->hw.clk, mux); in krait_add_sec_mux() 243 mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL); in krait_add_pri_mux() 244 if (!mux) in krait_add_pri_mux() 248 mux->shift = 0; in krait_add_pri_mux() [all …]
|
| A 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/drivers/clk/uniphier/ |
| A D | clk-uniphier-mux.c | 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() 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() 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() 76 mux->reg = data->reg; in uniphier_clk_register_mux() 78 mux->vals = data->vals; in uniphier_clk_register_mux() 79 mux->hw.init = &init; in uniphier_clk_register_mux() [all …]
|
| /linux/net/kcm/ |
| A D | kcmsock.c | 59 struct kcm_mux *mux = psock->mux; in kcm_abort_tx_psock() local 125 struct kcm_mux *mux = kcm->mux; in kcm_rcv_ready() local 174 struct kcm_mux *mux = kcm->mux; in kcm_rfree() local 257 struct kcm_mux *mux = psock->mux; in reserve_rx_kcm() local 426 mux = psock->mux; in psock_write_space() 445 struct kcm_mux *mux = kcm->mux; in reserve_psock() local 527 struct kcm_mux *mux = kcm->mux; in unreserve_psock() local 572 struct kcm_mux *mux = kcm->mux; in kcm_report_tx_retry() local 1192 kcm->mux = mux; in init_kcm_sock() 1258 psock->mux = mux; in kcm_attach() [all …]
|
| /linux/drivers/clk/sophgo/ |
| A D | clk-cv18xx-ip.c | 462 u32 reg = readl(mux->common.base + mux->mux.reg); in mux_get_parent() 471 reg = readl(mux->common.base + mux->mux.reg); in _mux_set_parent() 473 writel(reg, mux->common.base + mux->mux.reg); in _mux_set_parent() 520 if (cv1800_clk_checkbit(&mux->mux.common, &mux->bypass)) in bypass_mux_round_rate() 524 -1, &mux->mux); in bypass_mux_round_rate() 547 if (cv1800_clk_checkbit(&mux->mux.common, &mux->bypass)) in bypass_mux_recalc_rate() 558 if (cv1800_clk_checkbit(&mux->mux.common, &mux->bypass)) in bypass_mux_set_rate() 568 if (cv1800_clk_checkbit(&mux->mux.common, &mux->bypass)) in bypass_mux_get_parent() 579 return cv1800_clk_setbit(&mux->mux.common, &mux->bypass); in bypass_mux_set_parent() 730 mux = &mmux->mux[clk_sel]; in mmux_get_parent() [all …]
|
| /linux/drivers/dma/ |
| A D | lpc32xx-dmamux.c | 83 mux->signal, mux->muxval ? mux->name_sel1 : mux->name_sel1); in lpc32xx_dmamux_release() 87 mux->busy = false; in lpc32xx_dmamux_release() 107 mux = &lpc32xx_muxes[i]; in lpc32xx_dmamux_reserve() 111 if (!mux) { in lpc32xx_dmamux_reserve() 131 if (mux->busy) { in lpc32xx_dmamux_reserve() 134 mux->signal, mux->muxval ? mux->name_sel1 : mux->name_sel1); in lpc32xx_dmamux_reserve() 139 mux->busy = true; in lpc32xx_dmamux_reserve() 140 mux->muxval = dma_spec->args[2] ? BIT(mux->bit) : 0; in lpc32xx_dmamux_reserve() 142 regmap_update_bits(dmamux->reg, mux->muxreg, BIT(mux->bit), mux->muxval); in lpc32xx_dmamux_reserve() 149 mux->signal, mux->muxval ? mux->name_sel1 : mux->name_sel1); in lpc32xx_dmamux_reserve() [all …]
|
| /linux/drivers/clk/imx/ |
| A 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() 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() 90 fixup_mux->mux.reg = reg; in imx_clk_hw_fixup_mux() 91 fixup_mux->mux.shift = shift; in imx_clk_hw_fixup_mux() 94 fixup_mux->mux.hw.init = &init; in imx_clk_hw_fixup_mux() [all …]
|
| /linux/drivers/clk/sprd/ |
| A 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 …]
|