/linux/drivers/clk/mediatek/ |
A D | clk-mux.c | 26 if (mux->lock) in mtk_clk_mux_enable_setclr() 31 regmap_write(mux->regmap, mux->data->clr_ofs, in mtk_clk_mux_enable_setclr() 39 if (mux->reparent && mux->data->upd_shift >= 0) { in mtk_clk_mux_enable_setclr() 40 regmap_write(mux->regmap, mux->data->upd_ofs, in mtk_clk_mux_enable_setclr() 57 regmap_write(mux->regmap, mux->data->set_ofs, in mtk_clk_mux_disable_setclr() 66 regmap_read(mux->regmap, mux->data->mux_ofs, &val); in mtk_clk_mux_is_enabled() 77 regmap_read(mux->regmap, mux->data->mux_ofs, &val); in mtk_clk_mux_get_parent() 95 regmap_read(mux->regmap, mux->data->mux_ofs, &orig); in mtk_clk_mux_set_parent_setclr_lock() 100 regmap_write(mux->regmap, mux->data->clr_ofs, in mtk_clk_mux_set_parent_setclr_lock() 102 regmap_write(mux->regmap, mux->data->set_ofs, in mtk_clk_mux_set_parent_setclr_lock() [all …]
|
A D | clk-cpumux.c | 25 regmap_read(mux->regmap, mux->reg, &val); in clk_cpumux_get_parent() 27 val >>= mux->shift; in clk_cpumux_get_parent() 28 val &= mux->mask; in clk_cpumux_get_parent() 38 val = index << mux->shift; in clk_cpumux_set_parent() 39 mask = mux->mask << mux->shift; in clk_cpumux_set_parent() 41 return regmap_update_bits(mux->regmap, mux->reg, mask, val); in clk_cpumux_set_parent() 61 init.name = mux->name; in mtk_clk_register_cpumux() 65 init.flags = mux->flags; in mtk_clk_register_cpumux() 67 cpumux->reg = mux->mux_reg; in mtk_clk_register_cpumux() 68 cpumux->shift = mux->mux_shift; in mtk_clk_register_cpumux() [all …]
|
/linux/drivers/clk/ti/ |
A D | mux.c | 82 val = mux->mask << (mux->shift + 16); in ti_clk_mux_set_parent() 85 val &= ~(mux->mask << mux->shift); in ti_clk_mux_set_parent() 89 ti_clk_latch(&mux->reg, mux->latch); in ti_clk_mux_set_parent() 140 mux = kzalloc(sizeof(*mux), GFP_KERNEL); in _register_mux() 141 if (!mux) in _register_mux() 236 mux = kzalloc(sizeof(*mux), GFP_KERNEL); in ti_clk_build_component_mux() 237 if (!mux) in ti_clk_build_component_mux() 252 mux->mask = (1 << fls(mux->mask)) - 1; in ti_clk_build_component_mux() 263 mux = kzalloc(sizeof(*mux), GFP_KERNEL); in of_ti_composite_mux_clk_setup() 264 if (!mux) in of_ti_composite_mux_clk_setup() [all …]
|
/linux/drivers/iio/multiplexer/ |
A D | iio-mux.c | 28 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 345 struct mux *mux; in mux_probe() local 389 mux->child = (struct mux_child *)(mux + 1); in mux_probe() [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 165 mux = devm_kzalloc(&pdev->dev, sizeof(*mux), GFP_KERNEL); in i2c_mux_reg_probe() 166 if (!mux) in i2c_mux_reg_probe() 171 sizeof(mux->data)); in i2c_mux_reg_probe() 195 if (mux->data.reg_size != 4 && mux->data.reg_size != 2 && in i2c_mux_reg_probe() 208 muxc->priv = mux; in i2c_mux_reg_probe() 216 nr = mux->data.base_nr ? (mux->data.base_nr + i) : 0; in i2c_mux_reg_probe() [all …]
|
A D | i2c-mux-gpio.c | 31 gpiod_set_array_value_cansleep(mux->ngpios, mux->gpios, NULL, values); in i2c_mux_gpio_set() 47 i2c_mux_gpio_set(mux, mux->data.idle); in i2c_mux_gpio_deselect() 132 mux->data.n_values, sizeof(*mux->data.values), in i2c_mux_gpio_probe_fw() 162 struct gpiomux *mux; in i2c_mux_gpio_probe() local 168 mux = devm_kzalloc(&pdev->dev, sizeof(*mux), GFP_KERNEL); in i2c_mux_gpio_probe() 169 if (!mux) in i2c_mux_gpio_probe() 178 sizeof(mux->data)); in i2c_mux_gpio_probe() 186 mux->ngpios = ngpios; in i2c_mux_gpio_probe() 200 muxc->priv = mux; in i2c_mux_gpio_probe() 244 u32 nr = mux->data.base_nr ? (mux->data.base_nr + i) : 0; in i2c_mux_gpio_probe() [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 | 114 struct mux_control *mux = &mux_chip->mux[i]; in mux_chip_alloc() local 131 int ret = mux->chip->ops->set(mux, state); in mux_control_set() 157 struct mux_control *mux = &mux_chip->mux[i]; in mux_chip_register() local 159 if (mux->idle_state == mux->cached_state) in mux_chip_register() 162 ret = mux_control_set(mux, mux->idle_state); in mux_chip_register() 316 mux_control_set(mux, mux->idle_state); in __mux_control_select() 425 mux->idle_state != mux->cached_state) in mux_control_deselect() 426 ret = mux_control_set(mux, mux->idle_state); in mux_control_deselect() 546 return mux; in devm_mux_control_get() 549 *ptr = mux; in devm_mux_control_get() [all …]
|
/linux/Documentation/devicetree/bindings/mux/ |
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 30 Optionally, mux controller nodes can also specify the state the mux should 38 mux controller chips with more than one mux controller, particularly when 48 #include <dt-bindings/mux/mux.h> 55 mux: mux-controller@50 { 110 mux: mux-controller { 117 adc-mux { 122 mux-controls = <&mux>; 143 adc-mux { [all …]
|
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 25 strings to label each of the mux controllers listed in the "mux-controls" 28 mux-ctrl-specifier typically encodes the chip-relative mux controller number. 29 If the mux controller chip only provides a single mux controller, the 35 mux-controls: 38 mux-control-names: [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: 35 - mux-reg-masks 44 #include <dt-bindings/mux/mux.h> 46 mux-controller { 54 mdio-mux-1 { 74 mdio-mux-2 { 97 #include <dt-bindings/mux/mux.h> [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 …]
|
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': 36 - mux-gpios 37 - "#mux-control-cells" 45 mux: mux-controller { 53 adc-mux { 58 mux-controls = <&mux>; 63 i2c-mux { [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/net/kcm/ |
A D | kcmsock.c | 57 struct kcm_mux *mux = psock->mux; in kcm_abort_tx_psock() local 123 struct kcm_mux *mux = kcm->mux; in kcm_rcv_ready() local 171 struct kcm_mux *mux = kcm->mux; in kcm_rfree() local 253 struct kcm_mux *mux = psock->mux; in reserve_rx_kcm() local 417 mux = psock->mux; in psock_write_space() 436 struct kcm_mux *mux = kcm->mux; in reserve_psock() local 518 struct kcm_mux *mux = kcm->mux; in unreserve_psock() local 563 struct kcm_mux *mux = kcm->mux; in kcm_report_tx_retry() local 1345 kcm->mux = mux; in init_kcm_sock() 1410 psock->mux = mux; in kcm_attach() [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/drivers/usb/typec/ |
A D | mux.c | 265 struct typec_mux *mux; in fwnode_typec_mux_get() local 272 return mux; in fwnode_typec_mux_get() 286 put_device(&mux->dev); in typec_mux_put() 293 if (IS_ERR_OR_NULL(mux)) in typec_mux_set() 296 return mux->set(mux, state); in typec_mux_set() 323 struct typec_mux *mux; in typec_mux_register() local 329 mux = kzalloc(sizeof(*mux), GFP_KERNEL); in typec_mux_register() 330 if (!mux) in typec_mux_register() 333 mux->set = desc->set; in typec_mux_register() 347 put_device(&mux->dev); in typec_mux_register() [all …]
|
/linux/drivers/clk/qcom/ |
A D | clk-krait.c | 28 regval &= ~(mux->mask << mux->shift); in __krait_mux_set_sel() 29 regval |= (sel & mux->mask) << mux->shift; in __krait_mux_set_sel() 30 if (mux->lpl) { in __krait_mux_set_sel() 31 regval &= ~(mux->mask << (mux->shift + LPL_SHIFT)); in __krait_mux_set_sel() 32 regval |= (sel & mux->mask) << (mux->shift + LPL_SHIFT); in __krait_mux_set_sel() 48 mux->en_mask = sel; in krait_mux_set_parent() 51 __krait_mux_set_sel(mux, sel); in krait_mux_set_parent() 53 mux->reparent = true; in krait_mux_set_parent() 64 sel >>= mux->shift; in krait_mux_get_parent() 65 sel &= mux->mask; in krait_mux_get_parent() [all …]
|
A D | krait-cc.c | 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() 130 mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL); in krait_add_sec_mux() 131 if (!mux) in krait_add_sec_mux() 136 mux->mask = 0x3; in krait_add_sec_mux() 137 mux->shift = 2; in krait_add_sec_mux() 140 mux->safe_sel = 0; in krait_add_sec_mux() 183 mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL); in krait_add_pri_mux() 184 if (!mux) in krait_add_pri_mux() 187 mux->mask = 0x3; in krait_add_pri_mux() [all …]
|
/linux/Documentation/i2c/ |
A D | i2c-topology.rst | 39 useful to know if a mux is mux-locked or if it is parent-locked. The 46 i2c-mux-gpio Normally parent-locked, mux-locked iff 49 i2c-mux-gpmux Normally parent-locked, mux-locked iff 55 i2c-mux-pinctrl Normally parent-locked, mux-locked iff 110 ML3. A mux-locked mux cannot be used by a driver for auto-closing 223 Parent-locked mux as parent of parent-locked mux 231 '--------' | | mux M1 |--. | mux M2 |--. .--------. 247 Mux-locked mux as parent of mux-locked mux 253 .--------. | mux- |-----| mux- |-----| dev D1 | 268 Mux-locked mux as parent of parent-locked mux [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() 89 fixup_mux->mux.reg = reg; in imx_clk_hw_fixup_mux() 90 fixup_mux->mux.shift = shift; in imx_clk_hw_fixup_mux() 93 fixup_mux->mux.hw.init = &init; in imx_clk_hw_fixup_mux() [all …]
|
/linux/arch/arm64/boot/dts/amlogic/ |
A D | meson-gxl.dtsi | 163 mux { 171 mux { 180 mux { 188 mux { 196 mux { 205 mux { 213 mux { 222 mux { 230 mux { 238 mux { [all …]
|
A D | meson-gxbb.dtsi | 105 mux { 113 mux { 122 mux { 130 mux { 139 mux { 147 mux { 156 mux { 164 mux { 172 mux { 180 mux { [all …]
|
A D | meson-g12-common.dtsi | 337 mux { 345 mux { 397 mux { 406 mux { 415 mux { 425 mux { 434 mux { 444 mux { 453 mux { 462 mux { [all …]
|
/linux/drivers/clk/tegra/ |
A D | clk-super.c | 40 val = readl_relaxed(mux->reg); in clk_super_get_parent() 57 (source == mux->pllx_index)) in clk_super_get_parent() 58 source = mux->div2_index; in clk_super_get_parent() 71 if (mux->lock) in clk_super_set_parent() 74 val = readl_relaxed(mux->reg); in clk_super_set_parent() 87 if ((mux->flags & TEGRA_DIVIDER_2) && ((index == mux->div2_index) || in clk_super_set_parent() 97 writel_relaxed(val, mux->reg); in clk_super_set_parent() 100 if (index == mux->div2_index) in clk_super_set_parent() 101 index = mux->pllx_index; in clk_super_set_parent() 112 writel_relaxed(val, mux->reg); in clk_super_set_parent() [all …]
|