Home
last modified time | relevance | path

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

123

/openbmc/linux/Documentation/devicetree/bindings/iio/adc/
H A 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 …]
/openbmc/linux/drivers/iio/adc/
H A 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
/openbmc/linux/arch/arm/include/asm/
H A 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 …]
H A Datomic.h1 /* SPDX-License-Identifier: GPL-2.0-only */
22 * strex/ldrex monitor on some implementations. The reason we can use it for
25 #define arch_atomic_read(v) READ_ONCE((v)->counter)
26 #define arch_atomic_set(v,i) WRITE_ONCE(((v)->counter), (i))
31 * ARMv6 UP and SMP safe atomic ops. We use load exclusive and
42 prefetchw(&v->counter); \
49 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) \
50 : "r" (&v->counter), "Ir" (i) \
60 prefetchw(&v->counter); \
68 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) \
[all …]
/openbmc/linux/drivers/thermal/qcom/
H A 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 …]
/openbmc/linux/drivers/power/supply/
H A 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 …]
H A Dug3105_battery.c1 // SPDX-License-Identifier: GPL-2.0+
5 * Note the uG3105 is not a full-featured autonomous fuel-gauge. Instead it is
6 * expected to be use in combination with some always on microcontroller reading
7 * its coulomb-counter before it can wrap (must be read every 400 seconds!).
9 * Since Linux does not monitor coulomb-counter changes while the device
19 * 4. Add some mechanism (needs userspace help, or maybe use efivar?) to remember
23 * and then use total_coulomb_count to report energy_now over time, resetting
25 * readings, esp. in the 30-70% range and allow userspace to estimate time
28 * capacity during run-time ?
32 * in a total_coulomb_count increase of 3277 units with a 5 milli-ohm sense R.
[all …]
/openbmc/linux/drivers/iio/light/
H A 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 …]
/openbmc/linux/sound/soc/sunxi/
H A 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_set_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_start_playback()
257 regmap_set_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_start_playback()
264 regmap_clear_bits(scodec->regmap, SUN4I_CODEC_DAC_FIFOC, in sun4i_codec_stop_playback()
270 /* Enable ADC DRQ */ in sun4i_codec_start_capture()
[all …]
/openbmc/u-boot/arch/arm/dts/
H A Dat91sam9rl.dtsi2 * at91sam9rl.dtsi - Device Tree Include file for AT91SAM9RL family SoC
4 * Copyright (C) 2014 Alexandre Belloni <alexandre.belloni@free-electrons.com>
10 #include <dt-bindings/pinctrl/at91.h>
11 #include <dt-bindings/clock/at91.h>
12 #include <dt-bindings/interrupt-controller/irq.h>
13 #include <dt-bindings/gpio/gpio.h>
14 #include <dt-bindings/pwm/pwm.h>
19 interrupt-parent = <&aic>;
42 compatible = "arm,arm926ej-s";
53 compatible = "fixed-clock";
[all …]
H A Dat91sam9260.dtsi2 * at91sam9260.dtsi - Device Tree Include file for AT91SAM9260 family SoC
6 * 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
12 #include <dt-bindings/pinctrl/at91.h>
13 #include <dt-bindings/interrupt-controller/irq.h>
14 #include <dt-bindings/gpio/gpio.h>
15 #include <dt-bindings/clock/at91.h>
20 interrupt-parent = <&aic>;
41 compatible = "arm,arm926ej-s";
52 compatible = "fixed-clock";
53 #clock-cells = <0>;
[all …]
H A Dat91sam9g45.dtsi2 * at91sam9g45.dtsi - Device Tree Include file for AT91SAM9G45 family SoC
13 #include <dt-bindings/dma/at91.h>
14 #include <dt-bindings/pinctrl/at91.h>
15 #include <dt-bindings/interrupt-controller/irq.h>
16 #include <dt-bindings/gpio/gpio.h>
17 #include <dt-bindings/clock/at91.h>
22 interrupt-parent = <&aic>;
45 compatible = "arm,arm926ej-s";
56 compatible = "fixed-clock";
57 #clock-cells = <0>;
[all …]
/openbmc/linux/drivers/input/keyboard/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
17 tristate "ADC Ladder Buttons"
21 to an ADC using a resistor ladder.
23 Say Y here if your device has such buttons connected to an ADC. Your
24 board-specific setup logic must also provide a configuration data
38 be called adp5520-keys.
47 Say Y here if you want to use a ADP5588/87 attached to your
51 module will be called adp5588-keys.
57 Say Y here if you want to use a ADP5585/ADP5589 attached to your
61 module will be called adp5589-keys.
[all …]
H A Dsun4i-lradc-keys.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Allwinner sun4i low res adc attached tablet keys driver
14 * there are no boards known to use channel 1.
63 /* struct lradc_variant - Describe sun4i-a10-lradc-keys hardware variant
114 ints = readl(lradc->base + LRADC_INTS); in sun4i_lradc_irq()
122 input_report_key(lradc->input, lradc->chan0_keycode, 0); in sun4i_lradc_irq()
123 lradc->chan0_keycode = 0; in sun4i_lradc_irq()
126 if ((ints & CHAN0_KEYDOWN_IRQ) && lradc->chan0_keycode == 0) { in sun4i_lradc_irq()
127 val = readl(lradc->base + LRADC_DATA0) & 0x3f; in sun4i_lradc_irq()
128 voltage = val * lradc->vref / 63; in sun4i_lradc_irq()
[all …]
/openbmc/linux/drivers/thermal/ti-soc-thermal/
H A Dti-bandgap.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2011-2012 Texas Instruments Incorporated - http://www.ti.com/
6 * Author: J Keerthy <j-keerthy@ti.com>
7 * Author: Moiz Sonasath <m-sonasath@ti.com>
36 #include "ti-bandgap.h"
47 * ti_bandgap_readl() - simple read helper function
56 return readl(bgp->base + reg); in ti_bandgap_readl()
60 * ti_bandgap_writel() - simple write helper function
69 writel(val, bgp->base + reg); in ti_bandgap_writel()
75 * RMW_BITS() - used to read, modify and update bandgap bitfields.
[all …]
/openbmc/linux/sound/soc/codecs/
H A D88pm860x-codec.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * 88pm860x-codec.c -- 88PM860x ALSA SoC Audio Driver
26 #include "88pm860x-codec.h"
75 /* ADC Analog Register 1 (0xd0) */
117 * This widget should be just after DAC & PGA in DAPM power-on sequence and
118 * before DAC & PGA in DAPM power-off sequence.
149 /* -9450dB to 0dB in 150dB steps ( mute instead of -9450dB) */
150 static const DECLARE_TLV_DB_SCALE(dpga_tlv, -9450, 150, 1);
152 /* -9dB to 0db in 3dB steps */
153 static const DECLARE_TLV_DB_SCALE(adc_tlv, -900, 300, 0);
[all …]
/openbmc/linux/sound/soc/sprd/
H A Dsprd-mcdt.c1 // SPDX-License-Identifier: GPL-2.0
14 #include "sprd-mcdt.h"
121 u32 orig = readl_relaxed(mcdt->base + reg); in sprd_mcdt_update()
125 writel_relaxed(tmp, mcdt->base + reg); in sprd_mcdt_update()
187 writel_relaxed(val, mcdt->base + reg); in sprd_mcdt_dac_write_fifo()
195 *val = readl_relaxed(mcdt->base + reg); in sprd_mcdt_adc_read_fifo()
385 return !!(readl_relaxed(mcdt->base + reg) & BIT(shift)); in sprd_mcdt_chan_fifo_sts()
403 u32 r_addr = (readl_relaxed(mcdt->base + reg) >> in sprd_mcdt_dac_fifo_avail()
405 u32 w_addr = readl_relaxed(mcdt->base + reg) & MCDT_CH_FIFO_ADDR_MASK; in sprd_mcdt_dac_fifo_avail()
408 return 4 * (MCDT_FIFO_LENGTH - w_addr + r_addr); in sprd_mcdt_dac_fifo_avail()
[all …]
/openbmc/linux/drivers/mfd/
H A Dstmpe.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) ST-Ericsson SA 2010
7 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
26 * struct stmpe_platform_data - STMPE platform data
28 * @blocks: bitmask of blocks to enable (use STMPE_BLOCK_*)
29 * @irq_trigger: IRQ trigger to use for the interrupt to the host
43 return stmpe->variant->enable(stmpe, blocks, true); in __stmpe_enable()
48 return stmpe->variant->enable(stmpe, blocks, false); in __stmpe_disable()
55 ret = stmpe->ci->read_byte(stmpe, reg); in __stmpe_reg_read()
57 dev_err(stmpe->dev, "failed to read reg %#x: %d\n", reg, ret); in __stmpe_reg_read()
[all …]
/openbmc/linux/drivers/media/usb/gspca/stv06xx/
H A Dstv06xx_pb0100.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (c) 2001 Jean-Fredric Clere, Nikolas Zimmermann, Georg Acher
4 * Mark Cave-Ayland, Carlo E Prelz, Dick Streefland
9 * P/N 861050-0010: Sensor HDCS1000 ASIC STV0600
10 * P/N 861050-0020: Sensor Photobit PB100 ASIC STV0600-1 - QuickCam Express
11 * P/N 861055: Sensor ST VV6410 ASIC STV0610 - LEGO cam
12 * P/N 861075-0040: Sensor HDCS1000 ASIC
13 * P/N 961179-0700: Sensor ST VV6410 ASIC STV0602 - Dexxa WebCam USB
14 * P/N 861040-0000: Sensor ST VV6410 ASIC STV0610 - QuickCam Web
18 * The spec file for the PB-0100 suggests the following for best quality
[all …]

123