| /kernel/linux/linux-5.10/sound/soc/stm/ |
| D | stm32_sai_sub.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2016, STMicroelectronics - All Rights Reserved 10 #include <linux/clk-provider.h> 41 #define STM_SAI_IS_PLAYBACK(ip) ((ip)->dir == SNDRV_PCM_STREAM_PLAYBACK) 42 #define STM_SAI_IS_CAPTURE(ip) ((ip)->dir == SNDRV_PCM_STREAM_CAPTURE) 47 #define STM_SAI_IS_SUB_A(x) ((x)->id == STM_SAI_A_ID) 48 #define STM_SAI_IS_SUB_B(x) ((x)->id == STM_SAI_B_ID) 49 #define STM_SAI_BLOCK_NAME(x) (((x)->id == STM_SAI_A_ID) ? "A" : "B") 55 #define STM_SAI_PROTOCOL_IS_SPDIF(ip) ((ip)->spdif) 56 #define STM_SAI_HAS_SPDIF(x) ((x)->pdata->conf.has_spdif_pdm) [all …]
|
| /kernel/linux/linux-6.6/sound/soc/stm/ |
| D | stm32_sai_sub.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2016, STMicroelectronics - All Rights Reserved 10 #include <linux/clk-provider.h> 41 #define STM_SAI_IS_PLAYBACK(ip) ((ip)->dir == SNDRV_PCM_STREAM_PLAYBACK) 42 #define STM_SAI_IS_CAPTURE(ip) ((ip)->dir == SNDRV_PCM_STREAM_CAPTURE) 47 #define STM_SAI_IS_SUB_A(x) ((x)->id == STM_SAI_A_ID) 53 #define STM_SAI_PROTOCOL_IS_SPDIF(ip) ((ip)->spdif) 54 #define STM_SAI_HAS_SPDIF(x) ((x)->pdata->conf.has_spdif_pdm) 55 #define STM_SAI_HAS_PDM(x) ((x)->pdata->conf.has_spdif_pdm) 56 #define STM_SAI_HAS_EXT_SYNC(x) (!STM_SAI_IS_F4(sai->pdata)) [all …]
|
| D | stm32_i2s.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved 11 #include <linux/clk-provider.h> 136 #define I2S_CGFR_I2SDIV_MAX ((1 << (I2S_CGFR_I2SDIV_BIT_H -\ 137 I2S_CGFR_I2SDIV_SHIFT)) - 1) 198 #define STM32_I2S_IS_MASTER(x) ((x)->ms_flg == I2S_MS_MASTER) 199 #define STM32_I2S_IS_SLAVE(x) ((x)->ms_flg == I2S_MS_SLAVE) 205 * struct stm32_i2s_data - private data of I2S 214 * @i2smclk: master clock from I2S mclk provider 225 * @div: prescaler div field [all …]
|
| /kernel/linux/linux-6.6/arch/powerpc/platforms/512x/ |
| D | clock-commonclk.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 12 #include <linux/clk-provider.h> 21 #include <dt-bindings/clock/mpc512x-clock.h> 25 /* helpers to keep the MCLK intermediates "somewhere" in our table */ 47 /* intermediates in div+gate combos or fractional dividers */ 61 /* intermediates for the mux+gate+div+mux MCLK generation */ 89 * interpretation, no CFM, different fourth PSC/CAN mux0 input -- yet 225 int mul, int div) in mpc512x_clk_factor() argument 231 mul, div); in mpc512x_clk_factor() 292 val &= (1 << len) - 1; in get_bit_field() [all …]
|
| /kernel/linux/linux-5.10/arch/powerpc/platforms/512x/ |
| D | clock-commonclk.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 12 #include <linux/clk-provider.h> 21 #include <dt-bindings/clock/mpc512x-clock.h> 25 /* helpers to keep the MCLK intermediates "somewhere" in our table */ 47 /* intermediates in div+gate combos or fractional dividers */ 61 /* intermediates for the mux+gate+div+mux MCLK generation */ 89 * interpretation, no CFM, different fourth PSC/CAN mux0 input -- yet 225 int mul, int div) in mpc512x_clk_factor() argument 231 mul, div); in mpc512x_clk_factor() 292 val &= (1 << len) - 1; in get_bit_field() [all …]
|
| /kernel/linux/linux-6.6/sound/aoa/soundbus/i2sbus/ |
| D | interface.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * i2sbus driver -- interface register definitions 61 * - clock source 62 * - MClk divisor 63 * - SClk divisor 64 * - SClk master flag 65 * - serial format (sony, i2s 64x, i2s 32x, dav, silabs) 66 * - external sample frequency interrupt (don't understand) 67 * - external sample frequency 80 /* MClk is the clock that drives the codec, usually called its 'system clock'. [all …]
|
| /kernel/linux/linux-5.10/sound/aoa/soundbus/i2sbus/ |
| D | interface.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * i2sbus driver -- interface register definitions 61 * - clock source 62 * - MClk divisor 63 * - SClk divisor 64 * - SClk master flag 65 * - serial format (sony, i2s 64x, i2s 32x, dav, silabs) 66 * - external sample frequency interrupt (don't understand) 67 * - external sample frequency 80 /* MClk is the clock that drives the codec, usually called its 'system clock'. [all …]
|
| /kernel/linux/linux-5.10/sound/soc/fsl/ |
| D | fsl_mqs.c | 1 // SPDX-License-Identifier: GPL-2.0 5 // Copyright (C) 2014-2015 Freescale Semiconductor, Inc. 12 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h> 35 struct clk *mclk; member 50 struct snd_soc_component *component = dai->component; in fsl_mqs_hw_params() 53 int div, res; in fsl_mqs_hw_params() local 56 mclk_rate = clk_get_rate(mqs_priv->mclk); in fsl_mqs_hw_params() 64 div = mclk_rate / (32 * lrclk * 2 * 8); in fsl_mqs_hw_params() 67 if (res == 0 && div > 0 && div <= 256) { in fsl_mqs_hw_params() 68 if (mqs_priv->use_gpr) { in fsl_mqs_hw_params() [all …]
|
| /kernel/linux/linux-5.10/drivers/spi/ |
| D | spi-sun4i.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (C) 2012 - 2014 Allwinner Tech 7 * Maxime Ripard <maxime.ripard@free-electrons.com> 57 #define SUN4I_CLK_CTL_CDR2(div) ((div) & SUN4I_CLK_CTL_CDR2_MASK) argument 59 #define SUN4I_CLK_CTL_CDR1(div) (((div) & SUN4I_CLK_CTL_CDR1_MASK) << 8) argument 81 struct clk *mclk; member 92 return readl(sspi->base_addr + reg); in sun4i_spi_read() 97 writel(value, sspi->base_addr + reg); in sun4i_spi_write() 138 while (len--) { in sun4i_spi_drain_fifo() 139 byte = readb(sspi->base_addr + SUN4I_RXDATA_REG); in sun4i_spi_drain_fifo() [all …]
|
| D | spi-sun6i.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (C) 2012 - 2014 Allwinner Tech 7 * Maxime Ripard <maxime.ripard@free-electrons.com> 67 #define SUN6I_CLK_CTL_CDR2(div) (((div) & SUN6I_CLK_CTL_CDR2_MASK) << 0) argument 69 #define SUN6I_CLK_CTL_CDR1(div) (((div) & SUN6I_CLK_CTL_CDR1_MASK) << 8) argument 87 struct clk *mclk; member 100 return readl(sspi->base_addr + reg); in sun6i_spi_read() 105 writel(value, sspi->base_addr + reg); in sun6i_spi_write() 138 while (len--) { in sun6i_spi_drain_fifo() 139 byte = readb(sspi->base_addr + SUN6I_RXDATA_REG); in sun6i_spi_drain_fifo() [all …]
|
| /kernel/linux/linux-6.6/drivers/spi/ |
| D | spi-sun4i.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (C) 2012 - 2014 Allwinner Tech 7 * Maxime Ripard <maxime.ripard@free-electrons.com> 57 #define SUN4I_CLK_CTL_CDR2(div) ((div) & SUN4I_CLK_CTL_CDR2_MASK) argument 59 #define SUN4I_CLK_CTL_CDR1(div) (((div) & SUN4I_CLK_CTL_CDR1_MASK) << 8) argument 81 struct clk *mclk; member 92 return readl(sspi->base_addr + reg); in sun4i_spi_read() 97 writel(value, sspi->base_addr + reg); in sun4i_spi_write() 138 while (len--) { in sun4i_spi_drain_fifo() 139 byte = readb(sspi->base_addr + SUN4I_RXDATA_REG); in sun4i_spi_drain_fifo() [all …]
|
| D | spi-sun6i.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (C) 2012 - 2014 Allwinner Tech 7 * Maxime Ripard <maxime.ripard@free-electrons.com> 74 #define SUN6I_CLK_CTL_CDR2(div) (((div) & SUN6I_CLK_CTL_CDR2_MASK) << 0) argument 76 #define SUN6I_CLK_CTL_CDR1(div) (((div) & SUN6I_CLK_CTL_CDR1_MASK) << 8) argument 105 struct clk *mclk; member 119 return readl(sspi->base_addr + reg); in sun6i_spi_read() 124 writel(value, sspi->base_addr + reg); in sun6i_spi_write() 157 while (len--) { in sun6i_spi_drain_fifo() 158 byte = readb(sspi->base_addr + SUN6I_RXDATA_REG); in sun6i_spi_drain_fifo() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/hisilicon/ |
| D | clk-hi3620.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (c) 2012-2013 Hisilicon Limited. 6 * Copyright (c) 2012-2013 Linaro Limited. 13 #include <linux/clk-provider.h> 20 #include <dt-bindings/clock/hi3620-clock.h> 217 CLK_OF_DECLARE(hi3620_clk, "hisilicon,hi3620-clock", hi3620_clk_init); 284 struct clk_mmc *mclk = to_mmc(hw); in mmc_clk_determine_rate() local 286 if ((req->rate <= 13000000) && (mclk->id == HI3620_MMC_CIUCLK1)) { in mmc_clk_determine_rate() 287 req->rate = 13000000; in mmc_clk_determine_rate() 288 req->best_parent_rate = 26000000; in mmc_clk_determine_rate() [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/hisilicon/ |
| D | clk-hi3620.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (c) 2012-2013 Hisilicon Limited. 6 * Copyright (c) 2012-2013 Linaro Limited. 13 #include <linux/clk-provider.h> 19 #include <dt-bindings/clock/hi3620-clock.h> 216 CLK_OF_DECLARE(hi3620_clk, "hisilicon,hi3620-clock", hi3620_clk_init); 283 struct clk_mmc *mclk = to_mmc(hw); in mmc_clk_determine_rate() local 285 if ((req->rate <= 13000000) && (mclk->id == HI3620_MMC_CIUCLK1)) { in mmc_clk_determine_rate() 286 req->rate = 13000000; in mmc_clk_determine_rate() 287 req->best_parent_rate = 26000000; in mmc_clk_determine_rate() [all …]
|
| /kernel/linux/linux-6.6/sound/soc/fsl/ |
| D | fsl_mqs.c | 1 // SPDX-License-Identifier: GPL-2.0 5 // Copyright (C) 2014-2015 Freescale Semiconductor, Inc. 12 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h> 34 * struct fsl_mqs_soc_data - soc specific data 63 struct clk *mclk; member 77 struct snd_soc_component *component = dai->component; in fsl_mqs_hw_params() 80 int div, res; in fsl_mqs_hw_params() local 83 mclk_rate = clk_get_rate(mqs_priv->mclk); in fsl_mqs_hw_params() 91 div = mclk_rate / (32 * lrclk * 2 * 8); in fsl_mqs_hw_params() 94 if (res == 0 && div > 0 && div <= 256) { in fsl_mqs_hw_params() [all …]
|
| /kernel/linux/linux-6.6/sound/soc/codecs/ |
| D | src4xxx.c | 1 // SPDX-License-Identifier: GPL-2.0 5 // Copyright 2021-2022 Deqx Pty Ltd 25 static const DECLARE_TLV_DB_SCALE(src_tlv, -12750, 50, 0); 100 SND_SOC_DAPM_INPUT("MCLK"), 132 /* SRC mclk selection */ 133 {"SRC mclk source", "Master (MCLK)", "MCLK"}, 134 {"SRC mclk source", "Master (RXCLKI)", "RXMCLKI"}, 135 {"SRC mclk source", "Recovered receiver clk", "RXMCLKO"}, 156 struct snd_soc_component *component = dai->component; in src4xxx_set_dai_fmt() 163 src4xxx->master[dai->id] = true; in src4xxx_set_dai_fmt() [all …]
|
| D | ak4375.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 23 #define PMCP2 BIT(1) /* Charge Pump 2: Class-G HP Amp */ 71 #define DIV BIT(4) macro 118 * from -12.5 to 3 dB in 0.5 dB steps (mute instead of -12.5 dB) 120 static DECLARE_TLV_DB_SCALE(dac_tlv, -1250, 50, 0); 123 * HP-Amp Analog volume control: 124 * from -4.2 to 6 dB in 2 dB steps (mute instead of -4.2 dB) 126 static DECLARE_TLV_DB_SCALE(hpg_tlv, -4200, 20, 0); 132 "+-VDD Operation", 133 "+-1/2VDD Operation" [all …]
|
| /kernel/linux/linux-6.6/drivers/media/dvb-frontends/ |
| D | m88ds3103.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 ret = regmap_bulk_read(dev->regmap, reg, &tmp, 1); in m88ds3103_update_bits() 30 return regmap_bulk_write(dev->regmap, reg, &val, 1); in m88ds3103_update_bits() 37 struct i2c_client *client = dev->client; in m88ds3103_wr_reg_val_tab() 41 dev_dbg(&client->dev, "tab_len=%d\n", tab_len); in m88ds3103_wr_reg_val_tab() 44 ret = -EINVAL; in m88ds3103_wr_reg_val_tab() 51 if (i == tab_len - 1 || tab[i].reg != tab[i + 1].reg - 1 || in m88ds3103_wr_reg_val_tab() 52 !((j + 1) % (dev->cfg->i2c_wr_max - 1))) { in m88ds3103_wr_reg_val_tab() 53 ret = regmap_bulk_write(dev->regmap, tab[i].reg - j, buf, j + 1); in m88ds3103_wr_reg_val_tab() 57 j = -1; in m88ds3103_wr_reg_val_tab() [all …]
|
| /kernel/linux/linux-5.10/drivers/media/dvb-frontends/ |
| D | m88ds3103.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 ret = regmap_bulk_read(dev->regmap, reg, &tmp, 1); in m88ds3103_update_bits() 30 return regmap_bulk_write(dev->regmap, reg, &val, 1); in m88ds3103_update_bits() 37 struct i2c_client *client = dev->client; in m88ds3103_wr_reg_val_tab() 41 dev_dbg(&client->dev, "tab_len=%d\n", tab_len); in m88ds3103_wr_reg_val_tab() 44 ret = -EINVAL; in m88ds3103_wr_reg_val_tab() 51 if (i == tab_len - 1 || tab[i].reg != tab[i + 1].reg - 1 || in m88ds3103_wr_reg_val_tab() 52 !((j + 1) % (dev->cfg->i2c_wr_max - 1))) { in m88ds3103_wr_reg_val_tab() 53 ret = regmap_bulk_write(dev->regmap, tab[i].reg - j, buf, j + 1); in m88ds3103_wr_reg_val_tab() 57 j = -1; in m88ds3103_wr_reg_val_tab() [all …]
|
| D | bsbe1.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * bsbe1.h - ALPS BSBE1 tuner support 13 0x02, 0x30, /* MCLK = 88 MHz */ 57 struct dtv_frontend_properties *p = &fe->dtv_property_cache; in alps_bsbe1_tuner_set_params() 60 u32 div; in alps_bsbe1_tuner_set_params() local 62 struct i2c_adapter *i2c = fe->tuner_priv; in alps_bsbe1_tuner_set_params() 64 if ((p->frequency < 950000) || (p->frequency > 2150000)) in alps_bsbe1_tuner_set_params() 65 return -EINVAL; in alps_bsbe1_tuner_set_params() 67 div = p->frequency / 1000; in alps_bsbe1_tuner_set_params() 68 data[0] = (div >> 8) & 0x7f; in alps_bsbe1_tuner_set_params() [all …]
|
| /kernel/linux/linux-5.10/sound/soc/codecs/ |
| D | adau17x1.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright 2011-2014 Analog Devices Inc. 6 * Author: Lars-Peter Clausen <lars@metafoo.de> 27 #include "adau-utils.h" 49 static const DECLARE_TLV_DB_MINMAX(adau17x1_digital_tlv, -9563, 0); 61 SOC_SINGLE("Playback De-emphasis Switch", ADAU17X1_DAC_CONTROL0, 75 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in adau17x1_pll_event() 79 adau->pll_regs[5] = 1; in adau17x1_pll_event() 81 adau->pll_regs[5] = 0; in adau17x1_pll_event() 84 regmap_update_bits(adau->regmap, ADAU17X1_CLOCK_CONTROL, in adau17x1_pll_event() [all …]
|
| /kernel/linux/linux-5.10/sound/soc/cirrus/ |
| D | ep93xx-i2s.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * linux/sound/soc/ep93xx-i2s.c 26 #include <linux/platform_data/dma-ep93xx.h> 29 #include "ep93xx-pcm.h" 59 * 0 - Generate interrupt when FIFO is half empty 60 * 1 - Generate interrupt when FIFO is empty 74 struct clk *mclk; member 84 .name = "i2s-pcm-out", 89 .name = "i2s-pcm-in", 98 __raw_writel(val, info->regs + reg); in ep93xx_i2s_write_reg() [all …]
|
| /kernel/linux/linux-6.6/sound/soc/cirrus/ |
| D | ep93xx-i2s.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * linux/sound/soc/ep93xx-i2s.c 27 #include <linux/platform_data/dma-ep93xx.h> 30 #include "ep93xx-pcm.h" 60 * 0 - Generate interrupt when FIFO is half empty 61 * 1 - Generate interrupt when FIFO is empty 75 struct clk *mclk; member 85 .name = "i2s-pcm-out", 90 .name = "i2s-pcm-in", 99 __raw_writel(val, info->regs + reg); in ep93xx_i2s_write_reg() [all …]
|
| /kernel/linux/linux-5.10/drivers/i2c/busses/ |
| D | i2c-bcm2835.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <linux/clk-provider.h> 27 * 16-bit field for the number of SCL cycles to wait after rising SCL 76 writel(val, i2c_dev->regs + reg); in bcm2835_i2c_writel() 81 return readl(i2c_dev->regs + reg); in bcm2835_i2c_readl() 104 return -EINVAL; in clk_bcm2835_i2c_calc_divider() 112 struct clk_bcm2835_i2c *div = to_clk_bcm2835_i2c(hw); in clk_bcm2835_i2c_set_rate() local 116 if (divider == -EINVAL) in clk_bcm2835_i2c_set_rate() 117 return -EINVAL; in clk_bcm2835_i2c_set_rate() 119 bcm2835_i2c_writel(div->i2c_dev, BCM2835_I2C_DIV, divider); in clk_bcm2835_i2c_set_rate() [all …]
|
| /kernel/linux/linux-6.6/drivers/i2c/busses/ |
| D | i2c-bcm2835.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <linux/clk-provider.h> 27 * 16-bit field for the number of SCL cycles to wait after rising SCL 76 writel(val, i2c_dev->regs + reg); in bcm2835_i2c_writel() 81 return readl(i2c_dev->regs + reg); in bcm2835_i2c_readl() 104 return -EINVAL; in clk_bcm2835_i2c_calc_divider() 112 struct clk_bcm2835_i2c *div = to_clk_bcm2835_i2c(hw); in clk_bcm2835_i2c_set_rate() local 116 if (divider == -EINVAL) in clk_bcm2835_i2c_set_rate() 117 return -EINVAL; in clk_bcm2835_i2c_set_rate() 119 bcm2835_i2c_writel(div->i2c_dev, BCM2835_I2C_DIV, divider); in clk_bcm2835_i2c_set_rate() [all …]
|