Home
last modified time | relevance | path

Searched +full:adc +full:- +full:use +full:- +full:res (Results 1 – 25 of 112) sorted by relevance

12345

/kernel/linux/linux-5.10/Documentation/devicetree/bindings/iio/adc/
Dat91_adc.txt1 * AT91's Analog to Digital Converter (ADC)
4 - compatible: Should be "atmel,<chip>-adc"
6 - reg: Should contain ADC registers location and length
7 - interrupts: Should contain the IRQ line for the ADC
8 - clock-names: tuple listing input clock names.
10 - clocks: phandles to input clocks.
11 - atmel,adc-channels-used: Bitmask of the channels muxed and enabled for this
13 - atmel,adc-startup-time: Startup Time of the ADC in microseconds as
15 - atmel,adc-vref: Reference voltage in millivolts for the conversions
16 - atmel,adc-res: List of resolutions in bits supported by the ADC. List size
[all …]
/kernel/linux/linux-6.6/Documentation/devicetree/bindings/iio/adc/
Datmel,sama9260-adc.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/iio/adc/atmel,sama9260-adc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: AT91 sama9260 and similar Analog to Digital Converter (ADC)
10 - Alexandre Belloni <alexandre.belloni@bootlin.com>
15 - atmel,at91sam9260-adc
16 - atmel,at91sam9rl-adc
17 - atmel,at91sam9g45-adc
18 - atmel,at91sam9x5-adc
[all …]
/kernel/linux/linux-5.10/drivers/iio/adc/
Dstm32-dfsdm-adc.c1 // SPDX-License-Identifier: GPL-2.0
3 * This file is the ADC part of the STM32 DFSDM driver
5 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
10 #include <linux/dma-mapping.h>
11 #include <linux/iio/adc/stm32-dfsdm-adc.h>
13 #include <linux/iio/hw-consumer.h>
15 #include <linux/iio/timer/stm32-lptim-trigger.h>
16 #include <linux/iio/timer/stm32-timer-trigger.h>
27 #include "stm32-dfsdm.h"
42 /* Limit filter output resolution to 31 bits. (i.e. sample range is +/-2^30) */
[all …]
Dab8500-gpadc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson SA 2010
11 * AB8500 General Purpose ADC driver. The AB8500 uses reference voltages:
19 * battery temperature or "ADC aux" 1 and 2. Other voltages are internal rails
22 * parts of the system are required to obtain handles to the ADC to do work
52 /* 0 = use rising edge, 1 = use falling edge */
54 /* 0 = use VTVOUT, 1 = use VRTC as pull-up supply for battery temp NTC */
63 * the bit layout is the same for SW and HW conversion set-up
163 #define AB8500_ADC_CH_IBAT_MIN (-6000) /* mA range measured by ADC for ibat */
165 #define AB8500_ADC_CH_IBAT_MIN_V (-60) /* mV range measured by ADC for ibat */
[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
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 */
81 * struct stm32_adc_trig_info - ADC trigger info
[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
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
67 * @num_adcs: maximum number of ADC instances in the common registers
79 * struct stm32_adc_priv - stm32 ADC core private data
[all …]
Dat91_adc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Driver for the ADC present in the Atmel AT91 evaluation boards.
40 #define AT91_ADC_TSAMOD (3 << 0) /* ADC mode */
41 #define AT91_ADC_TSAMOD_ADC_ONLY_MODE (0 << 0) /* ADC Mode */
105 #define AT91_ADC_ACR_PENDETSENS (0x3 << 0) /* pull-up resistor */
139 (st->registers->channel_base + (ch * 4))
141 (readl_relaxed(st->reg_base + reg))
143 (writel_relaxed(val, st->reg_base + reg))
157 * struct at91_adc_reg_desc - Various informations relative to registers
163 * @mr_prescal_mask: Mask of the PRESCAL field in the adc MR register
[all …]
Dti-adc108s102.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * TI ADC108S102 SPI ADC driver
5 * Copyright (c) 2013-2015 Intel Corporation.
12 * The communication with ADC chip is via the SPI bus (mode 3).
29 * In case of ACPI, we use the hard-wired 5000 mV of the Galileo and IOT2000
31 * via the vref-supply regulator.
36 * Defining the ADC resolution being 12 bits, we can use the same driver for
38 * chips. The ADC108S102 effectively returns a 12-bit result with the 2
39 * least-significant bits unset.
45 * 16-bit SPI command format:
[all …]
/kernel/linux/linux-6.6/drivers/iio/adc/
Dstm32-dfsdm-adc.c1 // SPDX-License-Identifier: GPL-2.0
3 * This file is the ADC part of the STM32 DFSDM driver
5 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
10 #include <linux/dma-mapping.h>
11 #include <linux/iio/adc/stm32-dfsdm-adc.h>
13 #include <linux/iio/hw-consumer.h>
15 #include <linux/iio/timer/stm32-lptim-trigger.h>
16 #include <linux/iio/timer/stm32-timer-trigger.h>
28 #include "stm32-dfsdm.h"
43 /* Limit filter output resolution to 31 bits. (i.e. sample range is +/-2^30) */
[all …]
Dab8500-gpadc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson SA 2010
11 * AB8500 General Purpose ADC driver. The AB8500 uses reference voltages:
19 * battery temperature or "ADC aux" 1 and 2. Other voltages are internal rails
22 * parts of the system are required to obtain handles to the ADC to do work
52 /* 0 = use rising edge, 1 = use falling edge */
54 /* 0 = use VTVOUT, 1 = use VRTC as pull-up supply for battery temp NTC */
63 * the bit layout is the same for SW and HW conversion set-up
163 #define AB8500_ADC_CH_IBAT_MIN (-6000) /* mA range measured by ADC for ibat */
165 #define AB8500_ADC_CH_IBAT_MIN_V (-60) /* mV range measured by ADC for ibat */
[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
12 #include <linux/dma-mapping.h>
16 #include <linux/iio/timer/stm32-lptim-trigger.h>
17 #include <linux/iio/timer/stm32-timer-trigger.h>
26 #include <linux/nvmem-consumer.h>
31 #include "stm32-adc-core.h"
36 /* BOOST bit must be set on STM32H7 when ADC clock is above 20MHz */
58 /* extsel - trigger mux selection value */
[all …]
Dat91_adc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Driver for the ADC present in the Atmel AT91 evaluation boards.
37 #define AT91_ADC_TSAMOD (3 << 0) /* ADC mode */
38 #define AT91_ADC_TSAMOD_ADC_ONLY_MODE (0 << 0) /* ADC Mode */
102 #define AT91_ADC_ACR_PENDETSENS (0x3 << 0) /* pull-up resistor */
136 (st->registers->channel_base + (ch * 4))
138 (readl_relaxed(st->reg_base + reg))
140 (writel_relaxed(val, st->reg_base + reg))
160 * struct at91_adc_trigger - description of triggers
162 * @value: value to set in the ADC's trigger setup register
[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
29 #include "stm32-adc-core.h"
45 * struct stm32_adc_common_regs - stm32 common registers
50 * @ier: interrupt enable register offset for each adc
65 * struct stm32_adc_priv_cfg - stm32 core compatible configuration data
69 * @ipid: adc identification number
72 * @num_adcs: maximum number of ADC instances in the common registers
[all …]
Dti-lmp92064.c1 // SPDX-License-Identifier: GPL-2.0
3 * Texas Instruments LMP92064 SPI ADC driver
7 * Based on linux/drivers/iio/adc/ti-tsc2046.c
46 * - IN Current (INC)
47 * - IN Voltage (INV)
126 static int lmp92064_read_meas(struct lmp92064_adc_priv *priv, u16 *res) in lmp92064_read_meas() argument
132 * The ADC only latches in new samples if all DATA registers are read in lmp92064_read_meas()
134 * The ADC auto-decrements the register index with each clocked byte. in lmp92064_read_meas()
140 ret = regmap_bulk_read(priv->regmap, TI_LMP92064_REG_DATA_COUT_MSB, in lmp92064_read_meas()
144 dev_err(&priv->spi->dev, "regmap_bulk_read failed: %pe\n", in lmp92064_read_meas()
[all …]
Dti-adc108s102.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * TI ADC108S102 SPI ADC driver
5 * Copyright (c) 2013-2015 Intel Corporation.
12 * The communication with ADC chip is via the SPI bus (mode 3).
29 * In case of ACPI, we use the hard-wired 5000 mV of the Galileo and IOT2000
31 * via the vref-supply regulator.
36 * Defining the ADC resolution being 12 bits, we can use the same driver for
38 * chips. The ADC108S102 effectively returns a 12-bit result with the 2
39 * least-significant bits unset.
45 * 16-bit SPI command format:
[all …]
/kernel/linux/linux-6.6/arch/arm/include/asm/
Ddiv64.h1 /* SPDX-License-Identifier: GPL-2.0 */
18 * In other words, a 64-bit dividend with a 32-bit divisor producing
19 * a 64-bit result and a 32-bit remainder. To accomplish this optimally
48 * we can force the use of the out-of-line version for
57 unsigned long long res; in __arch_xprod_64() local
63 : "=&r" (res) in __arch_xprod_64()
67 res = m; in __arch_xprod_64()
70 : "+&r" (res) in __arch_xprod_64()
77 "adc %Q0, %1, #0" in __arch_xprod_64()
78 : "=&r" (res), "+&r" (tmp) in __arch_xprod_64()
[all …]
/kernel/linux/linux-5.10/drivers/thermal/qcom/
Dqcom-spmi-temp-alarm.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2011-2015, 2017, 2020, The Linux Foundation. All rights reserved.
62 /* Temperature in Milli Celsius reported during stage 0 if no ADC is present */
79 struct iio_channel *adc; member
90 ret = regmap_read(chip->map, chip->base + addr, &val); in qpnp_tm_read()
100 return regmap_write(chip->map, chip->base + addr, data); in qpnp_tm_write()
104 * qpnp_tm_get_temp_stage() - return over-temperature stage
118 if (chip->subtype == QPNP_TM_SUBTYPE_GEN1) in qpnp_tm_get_temp_stage()
135 WARN_ON(!mutex_is_locked(&chip->lock)); in qpnp_tm_update_temp_no_adc()
142 if (chip->subtype == QPNP_TM_SUBTYPE_GEN1) { in qpnp_tm_update_temp_no_adc()
[all …]
/kernel/linux/linux-5.10/arch/arm/include/asm/
Ddiv64.h1 /* SPDX-License-Identifier: GPL-2.0 */
18 * In other words, a 64-bit dividend with a 32-bit divisor producing
19 * a 64-bit result and a 32-bit remainder. To accomplish this optimally
57 * we can force the use of the out-of-line version for
66 * __div64_const32() code in asm-generic/div64.h. First there is
77 unsigned long long res; in __arch_xprod_64() local
83 : "=&r" (res) in __arch_xprod_64()
87 res = m; in __arch_xprod_64()
90 : "+&r" (res) in __arch_xprod_64()
97 "adc %Q0, %1, #0" in __arch_xprod_64()
[all …]
/kernel/linux/linux-6.6/drivers/thermal/qcom/
Dqcom-spmi-temp-alarm.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2011-2015, 2017, 2020, The Linux Foundation. All rights reserved.
44 /* Over-temperature trip point values in mC */
66 /* Temperature in Milli Celsius reported during stage 0 if no ADC is present */
83 struct iio_channel *adc; member
95 ret = regmap_read(chip->map, chip->base + addr, &val); in qpnp_tm_read()
105 return regmap_write(chip->map, chip->base + addr, data); in qpnp_tm_write()
109 * qpnp_tm_decode_temp() - return temperature in mC corresponding to the
110 * specified over-temperature stage
112 * @stage: Over-temperature stage
[all …]
/kernel/linux/linux-5.10/drivers/power/supply/
Dab8500_btemp.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson SA 2012
28 #include <linux/mfd/abx500/ab8500-bm.h>
33 #define BTEMP_THERMAL_LOW_LIMIT -10
49 * struct ab8500_btemp_interrupts - ab8500 interrupts
75 * struct ab8500_btemp - ab8500 BTEMP device information
78 * @curr_source: What current source we use, in uA
82 * @adc_btemp_ball: ADC channel for the battery ball temperature
83 * @adc_bat_ctrl: ADC channel for the battery control
123 * ab8500_btemp_get() - returns a reference to the primary AB8500 BTEMP
[all …]
/kernel/linux/linux-5.10/arch/arm/boot/dts/
Dat91sam9260.dtsi1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * at91sam9260.dtsi - Device Tree Include file for AT91SAM9260 family SoC
7 * 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
10 #include <dt-bindings/pinctrl/at91.h>
11 #include <dt-bindings/interrupt-controller/irq.h>
12 #include <dt-bindings/gpio/gpio.h>
13 #include <dt-bindings/clock/at91.h>
16 #address-cells = <1>;
17 #size-cells = <1>;
20 interrupt-parent = <&aic>;
[all …]
Dat91sam9rl.dtsi1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * at91sam9rl.dtsi - Device Tree Include file for AT91SAM9RL family SoC
6 * Alexandre Belloni <alexandre.belloni@free-electrons.com>
9 #include <dt-bindings/pinctrl/at91.h>
10 #include <dt-bindings/clock/at91.h>
11 #include <dt-bindings/interrupt-controller/irq.h>
12 #include <dt-bindings/gpio/gpio.h>
13 #include <dt-bindings/pwm/pwm.h>
16 #address-cells = <1>;
17 #size-cells = <1>;
[all …]
/kernel/linux/linux-5.10/sound/soc/sunxi/
Dsun4i-codec.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright 2015 Maxime Ripard <maxime.ripard@free-electrons.com>
7 * Copyright 2016 Chen-Yu Tsai <wens@csie.org>
79 /* Codec ADC digital controls and FIFO registers */
92 /* Codec ADC side analog signal controls */
187 /* ADC mixer controls */
253 regmap_update_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_start_playback()
258 regmap_update_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_start_playback()
266 regmap_update_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_stop_playback()
273 /* Enable ADC DRQ */ in sun4i_codec_start_capture()
[all …]
/kernel/linux/linux-5.10/drivers/iio/light/
Dgp2ap002.c1 // SPDX-License-Identifier: GPL-2.0-only
14 * https://lore.kernel.org/lkml/1315556546-7445-1-git-send-email-dg77.kim@samsung.com/
17 * https://lore.kernel.org/linux-input/20190125175045.22576-1-pawel.mikolaj.chmiel@gmail.com/
18 * Based partly on code from the Samsung GT-S7710 by <mjchen@sta.samsung.com>
28 #include <linux/iio/consumer.h> /* To get our ADC channel */
29 #include <linux/iio/types.h> /* To deal with our ADC channel */
42 /* ------------------------------------------------------------------------ */
45 /* ------------------------------------------------------------------------ */
52 /* ------------------------------------------------------------------------ */
54 /* LED0 :Select switch for LED driver's On-registence(0:2x higher, 1:normal)*/
[all …]
/kernel/linux/linux-6.6/drivers/power/supply/
Dab8500_btemp.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson SA 2012
31 #include <linux/fixp-arith.h>
33 #include "ab8500-bm.h"
35 #define BTEMP_THERMAL_LOW_LIMIT -10
51 * struct ab8500_btemp_interrupts - ab8500 interrupts
77 * struct ab8500_btemp - ab8500 BTEMP device information
80 * @curr_source: What current source we use, in uA
85 * @adc_bat_ctrl: ADC channel for the battery control
124 * ab8500_btemp_batctrl_volt_to_res() - convert batctrl voltage to resistance
[all …]

12345