Home
last modified time | relevance | path

Searched +full:adc +full:- +full:clk (Results 1 – 25 of 331) sorted by relevance

12345678910>>...14

/kernel/linux/linux-5.10/drivers/iio/adc/
Dlpc18xx_adc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * IIO ADC driver for NXP LPC18xx ADC
8 * - Hardware triggers
9 * - Burst mode
10 * - Interrupts
11 * - DMA
14 #include <linux/clk.h>
27 /* LPC18XX ADC registers and bits */
47 struct clk *clk; member
70 static int lpc18xx_adc_read_chan(struct lpc18xx_adc *adc, unsigned int ch) in lpc18xx_adc_read_chan() argument
[all …]
Dingenic-adc.c1 // SPDX-License-Identifier: GPL-2.0
3 * ADC driver for the Ingenic JZ47xx SoCs
4 * Copyright (c) 2019 Artur Rojek <contact@artur-rojek.eu>
6 * based on drivers/mfd/jz4740-adc.c
9 #include <dt-bindings/iio/adc/ingenic,adc.h>
10 #include <linux/clk.h>
98 int (*init_clk_div)(struct device *dev, struct ingenic_adc *adc);
103 struct clk *clk; member
112 struct ingenic_adc *adc = iio_priv(iio_dev); in ingenic_adc_set_adcmd() local
114 mutex_lock(&adc->lock); in ingenic_adc_set_adcmd()
[all …]
Dspear_adc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * ST SPEAr ADC driver
15 #include <linux/clk.h>
40 #define SPEAR_ADC_MOD_NAME "spear-adc"
51 u32 clk; /* Not avail for 1340 & 1310 */ member
64 u32 clk; member
76 struct clk *clk; member
86 * Functions to access some SPEAr ADC register. Abstracted into
92 __raw_writel(val, &st->adc_base_spear6xx->status); in spear_adc_set_status()
98 u32 apb_clk = clk_get_rate(st->clk); in spear_adc_set_clk()
[all …]
Dep93xx_adc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Driver for ADC module on the Cirrus Logic EP93xx series of SoCs
14 #include <linux/clk.h>
27 * lower ADC conversion rate down to CONFIG_HZ, so we fallback to busy wait
30 * HR Timers-based version loads CPU only up to 10% during back to back ADC
31 * conversion, while busy wait-based version consumes whole CPU power.
45 struct clk *clk; member
88 mutex_lock(&priv->lock); in ep93xx_read_raw()
89 if (priv->lastch != channel->channel) { in ep93xx_read_raw()
90 priv->lastch = channel->channel; in ep93xx_read_raw()
[all …]
Dlpc32xx_adc.c1 // SPDX-License-Identifier: GPL-2.0+
3 * lpc32xx_adc.c - Support for ADC in LPC32XX
5 * 3-channel, 10-bit ADC
10 #include <linux/clk.h>
45 #define LPC32XXAD_NAME "lpc32xx-adc"
49 struct clk *clk; member
67 mutex_lock(&indio_dev->mlock); in lpc32xx_read_raw()
68 ret = clk_prepare_enable(st->clk); in lpc32xx_read_raw()
70 mutex_unlock(&indio_dev->mlock); in lpc32xx_read_raw()
74 __raw_writel(LPC32XXAD_INTERNAL | (chan->address) | in lpc32xx_read_raw()
[all …]
Dexynos_adc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * exynos_adc.c - Support for ADC in EXYNOS SoCs
5 * 8 ~ 10 channel, 10/12-bit ADC
18 #include <linux/clk.h>
33 #include <linux/platform_data/touchscreen-s3c2410.h>
46 /* S3C2410 ADC registers definitions */
63 /* Bit definitions for S3C2410 ADC */
126 struct clk *clk; member
127 struct clk *sclk;
145 * a wait-callback is used to wait for the conversion result,
[all …]
Dad9467.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Analog Devices AD9467 SPI ADC driver
5 * Copyright 2012-2020 Analog Devices Inc.
22 #include <linux/clk.h>
24 #include <linux/iio/adc/adi-axi-adc.h>
27 * ADI High-Speed ADC common spi interface registers
28 * See Application-Note AN-877:
29 * https://www.analog.com/media/en/technical-documentation/application-notes/AN-877.pdf
80 * Analog Devices AD9265 16-Bit, 125/105/80 MSPS ADC
88 * Analog Devices AD9434 12-Bit, 370/500 MSPS ADC
[all …]
Daspeed_adc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Aspeed AST2400/2500 ADC
8 #include <linux/clk.h>
9 #include <linux/clk-provider.h>
96 of_device_get_match_data(data->dev); in aspeed_adc_read_raw()
100 *val = readw(data->base + chan->address); in aspeed_adc_read_raw()
104 *val = model_data->vref_voltage; in aspeed_adc_read_raw()
109 *val = clk_get_rate(data->clk_scaler->clk) / in aspeed_adc_read_raw()
114 return -EINVAL; in aspeed_adc_read_raw()
124 of_device_get_match_data(data->dev); in aspeed_adc_write_raw()
[all …]
Dstm32-adc-core.c1 // SPDX-License-Identifier: GPL-2.0
3 * This file is part of STM32 ADC driver
5 * Copyright (C) 2016, STMicroelectronics - All Rights Reserved
8 * Inspired from: fsl-imx25-tsadc
12 #include <linux/clk.h>
25 #include "stm32-adc-core.h"
41 * struct stm32_adc_common_regs - stm32 common registers
46 * @ier: interrupt enable register offset for each adc
61 * struct stm32_adc_priv_cfg - stm32 core compatible configuration data
77 * struct stm32_adc_priv - stm32 ADC core private data
[all …]
Dmcp3911.c1 // SPDX-License-Identifier: GPL-2.0
3 * Driver for Microchip MCP3911, Two-channel Analog Front End
8 #include <linux/clk.h>
53 struct clk *clki;
57 static int mcp3911_read(struct mcp3911 *adc, u8 reg, u32 *val, u8 len) in mcp3911_read() argument
61 reg = MCP3911_REG_READ(reg, adc->dev_addr); in mcp3911_read()
62 ret = spi_write_then_read(adc->spi, &reg, 1, val, len); in mcp3911_read()
67 *val >>= ((4 - len) * 8); in mcp3911_read()
68 dev_dbg(&adc->spi->dev, "reading 0x%x from register 0x%x\n", *val, in mcp3911_read()
73 static int mcp3911_write(struct mcp3911 *adc, u8 reg, u32 val, u8 len) in mcp3911_write() argument
[all …]
Dstm32-adc.c1 // SPDX-License-Identifier: GPL-2.0
3 * This file is part of STM32 ADC driver
5 * Copyright (C) 2016, STMicroelectronics - All Rights Reserved
9 #include <linux/clk.h>
11 #include <linux/dma-mapping.h>
15 #include <linux/iio/timer/stm32-lptim-trigger.h>
16 #include <linux/iio/timer/stm32-timer-trigger.h>
29 #include "stm32-adc-core.h"
34 /* BOOST bit must be set on STM32H7 when ADC clock is above 20MHz */
55 /* extsel - trigger mux selection value */
[all …]
Dfsl-imx25-gcq.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2014-2015 Pengutronix, Markus Pargmann <mpa@pengutronix.de>
6 * connected to the imx25 ADC.
9 #include <dt-bindings/iio/adc/fsl-imx25-gcq.h>
10 #include <linux/clk.h>
13 #include <linux/mfd/imx25-tsadc.h>
22 static const char * const driver_name = "mx25-gcq";
39 struct clk *clk; member
86 regmap_read(priv->regs, MX25_ADCQ_SR, &stats); in mx25_gcq_irq()
89 regmap_update_bits(priv->regs, MX25_ADCQ_MR, in mx25_gcq_irq()
[all …]
Dvf610_adc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Freescale Vybrid vf610 ADC driver
15 #include <linux/clk.h>
31 #define DRIVER_NAME "vf610-adc"
33 /* Vybrid/IMX ADC registers */
158 struct clk *clk; member
182 struct vf610_adc_feature *adc_feature = &info->adc_feature; in vf610_adc_calculate_rates()
183 unsigned long adck_rate, ipg_rate = clk_get_rate(info->clk); in vf610_adc_calculate_rates()
187 adck_rate = info->max_adck_rate[adc_feature->conv_mode]; in vf610_adc_calculate_rates()
190 /* calculate clk divider which is within specification */ in vf610_adc_calculate_rates()
[all …]
/kernel/linux/linux-5.10/arch/arm/mach-s3c/
Dadc.c1 // SPDX-License-Identifier: GPL-1.0+
5 // Ben Dooks <ben@simtec.co.uk>, <ben-linux@fluff.org>
7 // Samsung ADC device core
17 #include <linux/clk.h>
22 #include "regs-adc.h"
23 #include <linux/soc/samsung/s3c-adc.h>
25 /* This driver is designed to control the usage of the ADC block between
65 struct clk *clk; member
81 #define adc_dbg(_adc, msg...) dev_dbg(&(_adc)->pdev->dev, msg)
83 static inline void s3c_adc_convert(struct adc_device *adc) in s3c_adc_convert() argument
[all …]
/kernel/linux/patches/linux-5.10/imx8mm_patch/patches/drivers/
D0023_linux_drivers_iio.patch7 Change-Id: I60767bd38b95d43a7415b9e21575ad772380ae56
9 diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
11 --- a/drivers/iio/adc/Kconfig
12 +++ b/drivers/iio/adc/Kconfig
13 @@ -530,6 +530,16 @@ config IMX7D_ADC
18 + tristate "IMX8QXP ADC driver"
22 + Say yes here to build support for IMX8QXP ADC.
28 tristate "LP8788 ADC driver"
30 diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile
32 --- a/drivers/iio/adc/Makefile
[all …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/iio/adc/
Dst,stm32-dfsdm-adc.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/iio/adc/st,stm32-dfsdm-adc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: STMicroelectronics STM32 DFSDM ADC device driver
10 - Fabrice Gasnier <fabrice.gasnier@st.com>
11 - Olivier Moysan <olivier.moysan@st.com>
14 STM32 DFSDM ADC is a sigma delta analog-to-digital converter dedicated to
17 - Sigma delta modulators (motor control, metering...)
18 - PDM microphones (audio digital microphone)
[all …]
Dst,stm32-adc.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
4 $id: "http://devicetree.org/schemas/iio/adc/st,stm32-adc.yaml#"
5 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
7 title: STMicroelectronics STM32 ADC bindings
10 STM32 ADC is a successive approximation analog-to-digital converter.
12 in single, continuous, scan or discontinuous mode. Result of the ADC is
13 stored in a left-aligned or right-aligned 32-bit data register.
17 voltage goes beyond the user-defined, higher or lower thresholds.
19 Each STM32 ADC block can have up to 3 ADC instances.
[all …]
/kernel/linux/linux-5.10/sound/soc/sunxi/
Dsun8i-codec.c1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * (C) Copyright 2010-2016
9 * Mylène Josserand <mylene.josserand@free-electrons.com>
14 #include <linux/clk.h>
23 #include <sound/soc-dapm.h>
105 struct clk *clk_module;
114 regcache_cache_only(scodec->regmap, false); in sun8i_codec_runtime_resume()
116 ret = regcache_sync(scodec->regmap); in sun8i_codec_runtime_resume()
129 regcache_cache_only(scodec->regmap, true); in sun8i_codec_runtime_suspend()
130 regcache_mark_dirty(scodec->regmap); in sun8i_codec_runtime_suspend()
[all …]
/kernel/linux/linux-5.10/drivers/mfd/
Dfsl-imx25-tsadc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2014-2015 Pengutronix, Markus Pargmann <mpa@pengutronix.de>
6 #include <linux/clk.h>
12 #include <linux/mfd/imx25-tsadc.h>
35 regmap_read(tsadc->regs, MX25_TSC_TGSR, &status); in mx25_tsadc_irq_handler()
38 generic_handle_irq(irq_find_mapping(tsadc->domain, 1)); in mx25_tsadc_irq_handler()
41 generic_handle_irq(irq_find_mapping(tsadc->domain, 0)); in mx25_tsadc_irq_handler()
49 struct mx25_tsadc *tsadc = d->host_data; in mx25_tsadc_domain_map()
67 struct device *dev = &pdev->dev; in mx25_tsadc_setup_irq()
68 struct device_node *np = dev->of_node; in mx25_tsadc_setup_irq()
[all …]
Dti_am335x_tscadc.c2 * TI Touch Screen / ADC MFD driver
4 * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/
20 #include <linux/clk.h>
41 spin_lock_irqsave(&tscadc->reg_lock, flags); in am335x_tsc_se_set_cache()
42 tscadc->reg_se_cache |= val; in am335x_tsc_se_set_cache()
43 if (tscadc->adc_waiting) in am335x_tsc_se_set_cache()
44 wake_up(&tscadc->reg_se_wait); in am335x_tsc_se_set_cache()
45 else if (!tscadc->adc_in_use) in am335x_tsc_se_set_cache()
46 regmap_write(tscadc->regmap, REG_SE, tscadc->reg_se_cache); in am335x_tsc_se_set_cache()
48 spin_unlock_irqrestore(&tscadc->reg_lock, flags); in am335x_tsc_se_set_cache()
[all …]
/kernel/linux/linux-5.10/sound/soc/codecs/
Des8328.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * es8328.c -- ES8328 ALSA SoC Audio driver
5 * Copyright 2014 Sutajio Ko-Usagi PTE LTD
10 #include <linux/clk.h>
81 struct clk *clk; member
100 static const DECLARE_TLV_DB_SCALE(play_tlv, -3000, 100, 0);
101 static const DECLARE_TLV_DB_SCALE(dac_adc_tlv, -9600, 50, 0);
102 static const DECLARE_TLV_DB_SCALE(bypass_tlv, -1500, 300, 0);
124 if (es8328->deemph) { in es8328_set_deemph()
127 if (abs(deemph_settings[i].rate - es8328->playback_fs) < in es8328_set_deemph()
[all …]
Drt5514.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * rt5514.c -- RT5514 ALSA SoC audio codec driver
25 #include <sound/soc-dapm.h>
32 #include "rt5514-spi.h"
121 regmap_write(rt5514->i2c_regmap, 0x18002000, 0x000010ec); in rt5514_enable_dsp_prepare()
123 regmap_write(rt5514->i2c_regmap, 0x18002200, 0x00028604); in rt5514_enable_dsp_prepare()
125 regmap_write(rt5514->i2c_regmap, 0xfafafafa, 0x00000001); in rt5514_enable_dsp_prepare()
126 /* mini-core reset */ in rt5514_enable_dsp_prepare()
127 regmap_write(rt5514->i2c_regmap, 0x18002f00, 0x0005514b); in rt5514_enable_dsp_prepare()
128 regmap_write(rt5514->i2c_regmap, 0x18002f00, 0x00055149); in rt5514_enable_dsp_prepare()
[all …]
Djz4725b.c1 // SPDX-License-Identifier: GPL-2.0
14 #include <linux/clk.h>
142 struct clk *clk; member
145 static const SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(jz4725b_dac_tlv, -2250, 0);
146 static const SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(jz4725b_line_tlv, -1500, 600);
167 SOC_SINGLE("High-Pass Filter Capture Switch",
194 struct snd_soc_component *codec = snd_soc_dapm_to_component(w->dapm); in jz4725b_out_stage_enable()
196 struct regmap *map = icdc->regmap; in jz4725b_out_stage_enable()
215 return -EINVAL; in jz4725b_out_stage_enable()
224 /* ADC */
[all …]
Duda1380.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * uda1380.c - Philips UDA1380 ALSA SoC audio driver
5 * Copyright (c) 2007-2009 Philipp Zabel <philipp.zabel@gmail.com>
65 u16 *cache = uda1380->reg_cache; in uda1380_read_reg_cache()
70 return -1; in uda1380_read_reg_cache()
81 u16 *cache = uda1380->reg_cache; in uda1380_write_reg_cache()
86 set_bit(reg - 0x10, &uda1380_cache_dirty); in uda1380_write_reg_cache()
116 if (i2c_master_send(uda1380->i2c, data, 3) == 3) { in uda1380_write()
118 i2c_master_send(uda1380->i2c, data, 1); in uda1380_write()
119 i2c_master_recv(uda1380->i2c, data, 2); in uda1380_write()
[all …]
Dsirf-audio-codec.c1 // SPDX-License-Identifier: GPL-2.0-or-later
13 #include <linux/clk.h>
25 #include "sirf-audio-codec.h"
28 struct clk *clk; member
33 static const char * const input_mode_mux[] = {"Single-ended",
42 static const DECLARE_TLV_DB_SCALE(playback_vol_tlv, -12400, 100, 0);
45 0, 7, TLV_DB_SCALE_ITEM(-100, 100, 0),
91 /* After enable adc, Delay 200ms to avoid pop noise */
122 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in atlas6_codec_enable_and_reset_event()
126 enable_and_reset_codec(sirf_audio_codec->regmap, in atlas6_codec_enable_and_reset_event()
[all …]

12345678910>>...14