Home
last modified time | relevance | path

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

12

/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 …]
/linux/drivers/iio/adc/
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.
38 #define AT91_ADC_TSAMOD (3 << 0) /* ADC mode */
39 #define AT91_ADC_TSAMOD_ADC_ONLY_MODE (0 << 0) /* ADC Mode */
103 #define AT91_ADC_ACR_PENDETSENS (0x3 << 0) /* pull-up resistor */
137 (st->registers->channel_base + (ch * 4))
139 (readl_relaxed(st->reg_base + reg))
141 (writel_relaxed(val, st->reg_base + reg))
161 * struct at91_adc_trigger - description of triggers
163 * @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 Dad7606_par.c1 // SPDX-License-Identifier: GPL-2.0
3 * AD7606 Parallel Interface ADC driver
5 * Copyright 2011 - 2024 Analog Devices Inc.
30 for (c = 0; c < indio_dev->num_channels; c++) { in ad7606_par_bus_update_scan_mode()
32 ret = iio_backend_chan_enable(st->back, c); in ad7606_par_bus_update_scan_mode()
34 ret = iio_backend_chan_disable(st->back, c); in ad7606_par_bus_update_scan_mode()
52 st->back = devm_iio_backend_get(dev, NULL); in ad7606_par_bus_setup_iio_backend()
53 if (IS_ERR(st->back)) in ad7606_par_bus_setup_iio_backend()
54 return PTR_ERR(st->back); in ad7606_par_bus_setup_iio_backend()
57 if (!st->cnvst_pwm) in ad7606_par_bus_setup_iio_backend()
[all …]
/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.
66 /* Over-temperature trip point values in mC */
91 * TEMP_DAC_STG* = 0 --> 80 C
99 (((temp) - TEMP_DAC_MIN) * TEMP_DAC_SCALE_NUM / TEMP_DAC_SCALE_DEN)
120 /* Temperature in Milli Celsius reported during stage 0 if no ADC is present */
149 struct iio_channel *adc; member
160 ret = regmap_read(chip->map, chip->base + addr, &val); in qpnp_tm_read()
170 return regmap_write(chip->map, chip->base + addr, data); in qpnp_tm_write()
174 * qpnp_tm_decode_temp() - return temperature in mC corresponding to the
[all …]
H A Dtsens.c1 // SPDX-License-Identifier: GPL-2.0
11 #include <linux/nvmem-consumer.h>
26 * struct tsens_irq_data - IRQ status and temperature violations
81 if (priv->num_sensors > MAX_SENSORS) in tsens_read_calibration()
82 return -EINVAL; in tsens_read_calibration()
88 ret = nvmem_cell_read_variable_le_u32(priv->dev, name, &mode); in tsens_read_calibration()
89 if (ret == -ENOENT) in tsens_read_calibration()
90 dev_warn(priv->dev, "Please migrate to separate nvmem cells for calibration data\n"); in tsens_read_calibration()
94 dev_dbg(priv->dev, "calibration mode is %d\n", mode); in tsens_read_calibration()
100 ret = nvmem_cell_read_variable_le_u32(priv->dev, name, &base1); in tsens_read_calibration()
[all …]
/linux/arch/arm/include/asm/
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 …]
/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 …]
/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 …]
/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 …]
/linux/drivers/input/keyboard/
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.
62 /* struct lradc_variant - Describe sun4i-a10-lradc-keys hardware variant
113 ints = readl(lradc->base + LRADC_INTS); in sun4i_lradc_irq()
121 input_report_key(lradc->input, lradc->chan0_keycode, 0); in sun4i_lradc_irq()
122 lradc->chan0_keycode = 0; in sun4i_lradc_irq()
125 if ((ints & CHAN0_KEYDOWN_IRQ) && lradc->chan0_keycode == 0) { in sun4i_lradc_irq()
126 val = readl(lradc->base + LRADC_DATA0) & 0x3f; in sun4i_lradc_irq()
127 voltage = val * lradc->vref / 63; in sun4i_lradc_irq()
[all …]
/linux/sound/pci/emu10k1/
H A Demufx.c1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * James Courtier-Dutton <James@superbug.co.uk>
26 #if 0 /* for testing purposes - digital out -> capture */
29 #if 0 /* for testing purposes - set S/PDIF to AC3 output */
32 #if 0 /* for testing purposes - fee
2462 int res; snd_emu10k1_fx8010_info() local
2489 int res; snd_emu10k1_fx8010_ioctl() local
[all...]
/linux/fs/fat/
H A Dnamei_msdos.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * Hidden files 1995 by Albert Cahalan <albert@ccs.neu.edu> <adc@coe.neu.edu>
14 /* Characters that are undesirable in an MS-DOS file name */
18 /***** Formats an MS-DOS file name. Rejects invalid names. */
20 unsigned char *res, struct fat_mount_options *opts) in msdos_format_name() argument
22 * name is the proposed name, len is its length, res is in msdos_format_name()
23 * the resulting name, opts->name_check is either (r)elaxed, in msdos_format_name()
24 * (n)ormal or (s)trict, opts->dotsOK allows dots at the in msdos_format_name()
33 if (opts->dotsOK) { in msdos_format_name()
34 /* Get rid of dot - test for it elsewhere */ in msdos_format_name()
[all …]
/linux/drivers/thermal/mediatek/
H A Dauxadc_thermal.c1 // SPDX-License-Identifier: GPL-2.0-only
15 #include <linux/nvmem-consumer.h>
119 #define MT8173_TEMP_MIN -20000
474 * temperature sensors. We use each bank to measure a certain area of the
704 * raw_to_mcelsius_v1 - convert a raw ADC value to mcelsius
707 * @raw: raw ADC value
709 * This converts the raw ADC value to mcelsius using the SoC specific
719 tmp /= mt->conf->cali_val + mt->o_slope; in raw_to_mcelsius_v1()
720 tmp /= 10000 + mt->adc_ge; in raw_to_mcelsius_v1()
721 tmp *= raw - mt->vts[sensno] - 3350; in raw_to_mcelsius_v1()
[all …]
/linux/sound/soc/
H A Dsoc-jack.c1 // SPDX-License-Identifier: GPL-2.0+
3 // soc-jack.c -- ALSA SoC jack handling
20 * snd_soc_jack_report - Report the current status for a jack
39 if (!jack || !jack->jack) in snd_soc_jack_report()
43 dapm = &jack->card->dapm; in snd_soc_jack_report()
45 mutex_lock(&jack->mutex); in snd_soc_jack_report()
47 jack->status &= ~mask; in snd_soc_jack_report()
48 jack->status |= status & mask; in snd_soc_jack_report()
52 list_for_each_entry(pin, &jack->pins, list) { in snd_soc_jack_report()
53 int enable = pin->mask & jack->status; in snd_soc_jack_report()
[all …]
/linux/sound/hda/codecs/
H A Dca0132.c1 // SPDX-License-Identifier: GPL-2.0-or-later
74 #define DESKTOP_EFX_FILE "ctefx-desktop.bin"
75 #define R3DI_EFX_FILE "ctefx-r3di.bin"
115 #define VNODES_COUNT (VNODE_END_NID - VNODE_START_NID)
126 #define OUT_EFFECTS_COUNT (OUT_EFFECT_END_NID - OUT_EFFECT_START_NID)
134 #define IN_EFFECTS_COUNT (IN_EFFECT_END_NID - IN_EFFECT_START_NI
1528 codec_send_command(struct hda_codec * codec,hda_nid_t nid,unsigned int verb,unsigned int parm,unsigned int * res) codec_send_command() argument
1538 codec_set_converter_format(struct hda_codec * codec,hda_nid_t nid,unsigned short converter_format,unsigned int * res) codec_set_converter_format() argument
1546 codec_set_converter_stream_channel(struct hda_codec * codec,hda_nid_t nid,unsigned char stream,unsigned char channel,unsigned int * res) codec_set_converter_stream_channel() argument
1560 unsigned int res; chipio_send() local
1582 int res; chipio_write_address() local
1608 int res; chipio_write_data() local
1653 int res; chipio_read_data() local
2045 int res; dspio_send() local
2559 unsigned int res; dsp_reset() local
2900 int res; dsp_allocate_router_ports() local
7400 init_input(struct hda_codec * codec,hda_nid_t pin,hda_nid_t adc) init_input() argument
[all...]
/linux/drivers/spi/
H A Dspi-sprd-adi.c4 * SPDX-License-Identifier: GPL-2.0
36 #define REG_ADI_CHN_ADDR(id) (0x44 + (id - 2) * 4)
53 * ADI slave devices include RTC, ADC, regulator, charger, thermal and so on.
125 /* Use default timeout 50 ms that converts to watchdog values */
157 if (reg >= sadi->data->slave_addr_size) { in sprd_adi_check_addr()
158 dev_err(sadi->dev, in sprd_adi_check_addr()
161 return -EINVAL; in sprd_adi_check_addr()
173 sts = readl_relaxed(sadi->base + REG_ADI_ARM_FIFO_STS); in sprd_adi_drain_fifo()
178 } while (--timeout); in sprd_adi_drain_fifo()
181 dev_err(sadi->dev, "drain write fifo timeout\n"); in sprd_adi_drain_fifo()
[all …]
/linux/drivers/media/i2c/
H A Dbt819.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * bt819 - BT819A VideoStream Decoder (Rockwell Part)
12 * - moved over to linux>=2.4.x i2c protocol (9/9/2002)
25 #include <media/v4l2-device.h>
26 #include <media/v4l2-ctrls.h>
29 MODULE_DESCRIPTION("Brooktree-819 video decoder driver");
35 MODULE_PARM_DESC(debug, "Debug level (0-1)");
38 /* ----------------------------------------------------------------------- */
57 return &container_of(ctrl->handler, struct bt819, hdl)->sd; in to_sd()
71 {864 - 24, 20, 625 - 2, 1, 0x0504, 0x0000},
[all …]
/linux/sound/pci/
H A Dintel8x0.c1 // SPDX-License-Identifier: GPL-2.0-or-later
31 static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */
36 static int buggy_irq = -1; /* auto-check */
38 static int spdif_aclink = -1;
39 static int inside_vm = -
530 unsigned short res; snd_intel8x0_codec_read() local
[all...]
H A Dazt3328.c1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* azt3328.c - driver for Aztech AZF3328 based soundcards (e.g. PCI168).
3 * Copyright (C) 2002, 2005 - 2011 by Andreas Mohr <andi AT lisas.de>
7 * found in a Fujitsu-Siemens PC ("Cordant", aluminum case).
13 * Keywords: Windows XP Vista 168nt4-125.zip 168win95-12
1687 int res; snd_azf3328_gameport_open() local
[all...]
/linux/drivers/media/dvb-frontends/
H A Dstv090x.c1 // SPDX-License-Identifier: GPL-2.0-or-later
52 ((temp_dev->internal->i2c_adap != i2c_adap) || in find_dev()
53 (temp_dev->internal->i2c_addr != i2c_addr))) { in find_dev()
55 temp_dev = temp_dev->next_dev; in find_dev()
65 struct stv090x_dev *del_dev = find_dev(internal->i2c_adap, in remove_dev()
66 internal->i2c_addr); in remove_dev()
70 stv090x_first_dev = del_dev->next_dev; in remove_dev()
72 while (prev_dev->next_dev != del_dev) in remove_dev()
73 prev_dev = prev_dev->next_dev; in remove_dev()
75 prev_dev->next_dev = del_dev->next_dev; in remove_dev()
[all …]
H A Ddrxd_hard.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * drxd_hard.c: DVB-T Demodulator Micronas DRX3975D-A2,DRX397xD-B1
5 * Copyright (C) 2003-2007 Micronas
21 #define DRX_FW_FILENAME_A2 "drxd-a2-1.1.fw"
22 #define DRX_FW_FILENAME_B1 "drxd-b1-1.1.fw"
194 return -1; in i2c_write()
211 return -1; in i2c_read()
227 u8 adr = state->config.demod_address; in Read16()
232 if (i2c_read(state->i2c, adr, mm1, 4, mm2, 2) < 0) in Read16()
233 return -1; in Read16()
[all …]
/linux/drivers/hwmon/
H A Dit87.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * it87.c - Part of lm_sensors, Linux kernel modules for hardware
6 * The IT8705F is an LPC-based Super I/O part that contains UARTs, a
41 * Copyright (C) 2005-2010 Jean Delvare <jdelvare@suse.de>
53 #include <linux/hwmon-sysfs.h>
54 #include <linux/hwmon-vid.h>
126 return -EBUSY; in superio_enter()
212 /*----- The IT87 registers -----*/
222 * Super-I/O configuration space.
230 * The IT8705F and IT8712F earlier than revision 0x08 use register 0x0b
[all …]
/linux/sound/pci/cs46xx/
H A Dcs46xx_lib.c1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Abramo Bagnara <abramo@alsa-project.org>
9 * - Sometimes the SPDIF input DSP tasks get's unsynchronized
13 * - On the Hercules Game Theater XP the amplifier are sometimes turned
17 * - Secondary CODEC on some soundcards
18 * - SPDI
1981 int change, res; snd_cs46xx_iec958_put() local
[all...]
/linux/drivers/bus/
H A Dti-sysc.c1 // SPDX-License-Identifier: GPL-2.0
3 * ti-sysc.c - Texas Instruments sysc interconnect target driver
8 * Copyright (C) 2017-2024 Texas Instruments Incorporated - https://www.ti.com/
13 * Copyright (C) 2009-2011 Nokia Corporation
14 * Copyright (C) 2011-2021 Texas Instruments Incorporated - https://www.ti.com/
35 #include <linux/platform_data/ti-sysc.h>
37 #include <dt-bindings/bus/ti-sysc.h>
107 * struct sysc - TI sysc interconnect target module registers and capabilities
113 * @mdata: ti-sysc to hwmod translation data for a module
125 * @reserved: target module is reserved and already in use
[all …]

12