| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/mux/ |
| D | mux-controller.txt | 4 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 11 space is a simple zero-based enumeration. I.e. 0-1 for a 2-way multiplexer, 12 0-7 for an 8-way multiplexer, etc. 16 --------- 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] [all …]
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/mux/ |
| D | mux-consumer.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/mux/mux-consumer.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Peter Rosin <peda@axentia.se> 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 [all …]
|
| D | mux-controller.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/mux/mux-controller.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Peter Rosin <peda@axentia.se> 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 20 space is a simple zero-based enumeration. I.e. 0-1 for a 2-way multiplexer, [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/mediatek/ |
| D | clk-mux.c | 1 // SPDX-License-Identifier: GPL-2.0 12 #include "clk-mtk.h" 13 #include "clk-mux.h" 22 struct mtk_clk_mux *mux = to_mtk_clk_mux(hw); in mtk_clk_mux_enable() local 23 u32 mask = BIT(mux->data->gate_shift); in mtk_clk_mux_enable() 25 return regmap_update_bits(mux->regmap, mux->data->mux_ofs, in mtk_clk_mux_enable() 31 struct mtk_clk_mux *mux = to_mtk_clk_mux(hw); in mtk_clk_mux_disable() local 32 u32 mask = BIT(mux->data->gate_shift); in mtk_clk_mux_disable() 34 regmap_update_bits(mux->regmap, mux->data->mux_ofs, mask, mask); in mtk_clk_mux_disable() 39 struct mtk_clk_mux *mux = to_mtk_clk_mux(hw); in mtk_clk_mux_enable_setclr() local [all …]
|
| /kernel/linux/linux-6.6/drivers/mux/ |
| D | core.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #define pr_fmt(fmt) "mux-core: " fmt 19 #include <linux/mux/consumer.h> 20 #include <linux/mux/driver.h> 25 * The idle-as-is "state" is not an actual state that may be selected, it 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 46 .name = "mux", [all …]
|
| /kernel/liteos_a/testsuites/kernel/sample/kernel_base/ipc/ |
| D | BUILD.gn | 1 # Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. 2 # Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. 32 sources = [ "mux/It_los_mux.c" ] 35 "mux/full/It_los_mutex_006.c", 36 "mux/full/It_los_mutex_007.c", 37 "mux/full/It_los_mutex_008.c", 38 "mux/full/It_los_mutex_009.c", 39 "mux/full/It_los_mutex_010.c", 40 "mux/full/It_los_mutex_011.c", 41 "mux/full/It_los_mutex_012.c", [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/ti/ |
| D | mux.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 * Tero Kristo <t-kristo@ti.com> 10 #include <linux/clk-provider.h> 23 struct clk_omap_mux *mux = to_clk_omap_mux(hw); in ti_clk_mux_get_parent() local 28 * FIXME need a mux-specific flag to determine if val is bitwise or in ti_clk_mux_get_parent() 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() 43 return -EINVAL; in ti_clk_mux_get_parent() [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/mediatek/ |
| D | clk-mux.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <linux/clk-provider.h> 18 #include "clk-mux.h" 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() 48 * not be effective yet. Set the update bit to ensure the mux gets in mtk_clk_mux_enable_setclr() [all …]
|
| /kernel/linux/linux-6.6/drivers/iio/multiplexer/ |
| D | iio-mux.c | 1 // SPDX-License-Identifier: GPL-2.0 16 #include <linux/mux/consumer.h> 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() [all …]
|
| /kernel/linux/linux-5.10/drivers/i2c/muxes/ |
| D | i2c-mux-reg.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 10 #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) in i2c_mux_reg_set() argument 25 if (!mux->data.reg) in i2c_mux_reg_set() 26 return -EINVAL; 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() [all …]
|
| D | i2c-mux-gpio.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #include <linux/i2c-mux.h> 10 #include <linux/platform_data/i2c-mux-gpio.h> 25 static void i2c_mux_gpio_set(const struct gpiomux *mux, unsigned val) in i2c_mux_gpio_set() argument 31 gpiod_set_array_value_cansleep(mux->ngpios, mux->gpios, NULL, values); in i2c_mux_gpio_set() 36 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_select() local 38 i2c_mux_gpio_set(mux, chan); in i2c_mux_gpio_select() 45 struct gpiomux *mux = i2c_mux_priv(muxc); in i2c_mux_gpio_deselect() local 47 i2c_mux_gpio_set(mux, mux->data.idle); in i2c_mux_gpio_deselect() 53 static int i2c_mux_gpio_probe_dt(struct gpiomux *mux, in i2c_mux_gpio_probe_dt() argument [all …]
|
| /kernel/linux/linux-6.6/drivers/i2c/muxes/ |
| D | i2c-mux-reg.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 10 #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) in i2c_mux_reg_set() argument 25 if (!mux->data.reg) in i2c_mux_reg_set() 26 return -EINVAL; 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() [all …]
|
| D | i2c-mux-gpio.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #include <linux/i2c-mux.h> 11 #include <linux/platform_data/i2c-mux-gpio.h> 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 [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/ti/ |
| D | mux.c | 6 * Tero Kristo <t-kristo@ti.com> 18 #include <linux/clk-provider.h> 31 struct clk_omap_mux *mux = to_clk_omap_mux(hw); in ti_clk_mux_get_parent() local 36 * FIXME need a mux-specific flag to determine if val is bitwise or in ti_clk_mux_get_parent() 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() 51 return -EINVAL; in ti_clk_mux_get_parent() 54 if (val && (mux->flags & CLK_MUX_INDEX_BIT)) in ti_clk_mux_get_parent() [all …]
|
| /kernel/linux/linux-5.10/drivers/mux/ |
| D | core.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #define pr_fmt(fmt) "mux-core: " fmt 18 #include <linux/mux/consumer.h> 19 #include <linux/mux/driver.h> 25 * The idle-as-is "state" is not an actual state that may be selected, it 32 .name = "mux", 54 ida_simple_remove(&mux_ida, mux_chip->id); in mux_chip_release() 59 .name = "mux-chip", 64 * mux_chip_alloc() - Allocate a mux-chip. 65 * @dev: The parent device implementing the mux interface. [all …]
|
| /kernel/linux/linux-5.10/drivers/iio/multiplexer/ |
| D | iio-mux.c | 1 // SPDX-License-Identifier: GPL-2.0 15 #include <linux/mux/consumer.h> 28 struct mux { struct 38 static int iio_mux_select(struct mux *mux, int idx) in iio_mux_select() argument 40 struct mux_child *child = &mux->child[idx]; in iio_mux_select() 41 struct iio_chan_spec const *chan = &mux->chan[idx]; in iio_mux_select() 45 ret = mux_control_select(mux->control, chan->channel); in iio_mux_select() 47 mux->cached_state = -1; in iio_mux_select() 51 if (mux->cached_state == chan->channel) in iio_mux_select() 54 if (chan->ext_info) { in iio_mux_select() [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/amd/amdgpu/ |
| D | amdgpu_ring_mux.c | 43 static inline struct amdgpu_mux_entry *amdgpu_ring_mux_sw_entry(struct amdgpu_ring_mux *mux, in amdgpu_ring_mux_sw_entry() argument 46 return ring->entry_index < mux->ring_entry_size ? in amdgpu_ring_mux_sw_entry() 47 &mux->ring_entry[ring->entry_index] : NULL; in amdgpu_ring_mux_sw_entry() 51 static void amdgpu_ring_mux_copy_pkt_from_sw_ring(struct amdgpu_ring_mux *mux, in amdgpu_ring_mux_copy_pkt_from_sw_ring() argument 56 struct amdgpu_ring *real_ring = mux->real_ring; in amdgpu_ring_mux_copy_pkt_from_sw_ring() 58 start = s_start & ring->buf_mask; in amdgpu_ring_mux_copy_pkt_from_sw_ring() 59 end = s_end & ring->buf_mask; in amdgpu_ring_mux_copy_pkt_from_sw_ring() 66 amdgpu_ring_alloc(real_ring, (ring->ring_size >> 2) + end - start); in amdgpu_ring_mux_copy_pkt_from_sw_ring() 67 amdgpu_ring_write_multiple(real_ring, (void *)&ring->ring[start], in amdgpu_ring_mux_copy_pkt_from_sw_ring() 68 (ring->ring_size >> 2) - start); in amdgpu_ring_mux_copy_pkt_from_sw_ring() [all …]
|
| /kernel/linux/linux-6.6/sound/soc/codecs/ |
| D | tas5086.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * - implement DAPM and input muxing 9 * - implement modulation limit 10 * - implement non-default PWM start 13 * because the registers are of unequal size, and multi-byte registers 18 * it doesn't matter because the entire map can be accessed as 8-bit 21 * routines have to be open-coded. 71 #define TAS5086_CHANNEL_VOL(X) (0x08 + (X)) /* Channel 1-6 volume */ 89 * Default TAS5086 power-up configuration 173 size = tas5086_register_size(&client->dev, reg); in tas5086_reg_write() [all …]
|
| D | rt5665.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5665.c -- RT5665/RT5658 ALSA SoC audio codec driver 26 #include <sound/soc-dapm.h> 884 static const DECLARE_TLV_DB_SCALE(hp_vol_tlv, -2250, 150, 0); 885 static const DECLARE_TLV_DB_SCALE(mono_vol_tlv, -1400, 150, 0); 886 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0); 887 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -65625, 375, 0); 888 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0); 889 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0); 891 static const DECLARE_TLV_DB_SCALE(in_bst_tlv, -1200, 75, 0); [all …]
|
| /kernel/linux/linux-5.10/sound/soc/codecs/ |
| D | tas5086.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * - implement DAPM and input muxing 9 * - implement modulation limit 10 * - implement non-default PWM start 13 * because the registers are of unequal size, and multi-byte registers 18 * it doesn't matter because the entire map can be accessed as 8-bit 21 * routines have to be open-coded. 71 #define TAS5086_CHANNEL_VOL(X) (0x08 + (X)) /* Channel 1-6 volume */ 89 * Default TAS5086 power-up configuration 173 size = tas5086_register_size(&client->dev, reg); in tas5086_reg_write() [all …]
|
| D | rt5665.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5665.c -- RT5665/RT5658 ALSA SoC audio codec driver 27 #include <sound/soc-dapm.h> 888 static const DECLARE_TLV_DB_SCALE(hp_vol_tlv, -2250, 150, 0); 889 static const DECLARE_TLV_DB_SCALE(mono_vol_tlv, -1400, 150, 0); 890 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0); 891 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -65625, 375, 0); 892 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0); 893 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0); 895 static const DECLARE_TLV_DB_SCALE(in_bst_tlv, -1200, 75, 0); [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/ |
| D | clk-mux.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2011-2012 Mike Turquette, Linaro Ltd <mturquette@linaro.org> 10 #include <linux/clk-provider.h> 20 * prepare - clk_prepare only ensures that parents are prepared 21 * enable - clk_enable only ensures that parents are enabled 22 * rate - rate is only affected by parent switching. No clk_set_rate support 23 * parent - parent is adjustable through clk_set_parent 26 static inline u32 clk_mux_readl(struct clk_mux *mux) in clk_mux_readl() argument 28 if (mux->flags & CLK_MUX_BIG_ENDIAN) in clk_mux_readl() 29 return ioread32be(mux->reg); in clk_mux_readl() [all …]
|
| /kernel/linux/linux-6.6/include/linux/mux/ |
| D | driver.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * 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 controller. 33 * @cached_state: The current mux controller state, or -1 if none. [all …]
|
| /kernel/linux/linux-5.10/include/linux/mux/ |
| D | driver.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * mux/driver.h - definitions for the multiplexer driver interface 13 #include <dt-bindings/mux/mux.h> 21 * struct mux_control_ops - Mux controller operations for a mux chip. 22 * @set: Set the state of the given mux controller. 25 int (*set)(struct mux_control *mux, int state); 29 * struct mux_control - Represents a mux controller. 30 * @lock: Protects the mux controller state. 31 * @chip: The mux chip that is handling this mux controller. 32 * @cached_state: The current mux controller state, or -1 if none. [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/net/ |
| D | mdio-mux-multiplexer.txt | 3 This is a special case of MDIO mux when MDIO mux is defined as a consumer 4 of a mux producer device. The mux producer can be of any type like mmio mux 5 producer, gpio mux producer or generic register based mux producer. 9 - compatible : should be "mmio-mux-multiplexer" 10 - mux-controls : mux controller node to use for operating the mux 11 - mdio-parent-bus : phandle to the parent MDIO bus. 17 Documentation/devicetree/bindings/mux/mux-controller.txt 18 and Documentation/devicetree/bindings/net/mdio-mux.txt 21 In below example the Mux producer and consumer are separate nodes. 25 compatible = "fsl,lx2160aqds-fpga", "fsl,fpga-qixis-i2c", [all …]
|