Home
last modified time | relevance | path

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

12345678910>>...16

/kernel/linux/linux-6.6/drivers/iio/adc/
Dqcom-spmi-adc5.c1 // SPDX-License-Identifier: GPL-2.0
10 #include <linux/iio/adc/qcom-vadc-common.h>
23 #include <dt-bindings/iio/qcom,spmi-vadc.h>
104 * struct adc5_channel_prop - ADC channel property.
113 * @avg_samples: ability to provide single result from the ADC
133 * struct adc5_chip - ADC private structure.
136 * @base: base address for the ADC peripheral.
137 * @nchannels: number of ADC channels.
138 * @chan_props: array of ADC channel properties.
141 * @complete: ADC result notification after interrupt is received.
[all …]
Dmxs-lradc-adc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Freescale MXS LRADC ADC driver
18 #include <linux/mfd/mxs-lradc.h>
43 "mxs-lradc-channel0",
44 "mxs-lradc-channel1",
45 "mxs-lradc-channel2",
46 "mxs-lradc-channel3",
47 "mxs-lradc-channel4",
48 "mxs-lradc-channel5",
52 "mxs-lradc-thresh0",
[all …]
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 …]
Dti_am335x_adc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * TI ADC MFD driver
5 * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/
26 #include <linux/dma-mapping.h>
32 struct dma_chan *chan; member
54 static unsigned int tiadc_readl(struct tiadc_device *adc, unsigned int reg) in tiadc_readl() argument
56 return readl(adc->mfd_tscadc->tscadc_base + reg); in tiadc_readl()
59 static void tiadc_writel(struct tiadc_device *adc, unsigned int reg, in tiadc_writel() argument
62 writel(val, adc->mfd_tscadc->tscadc_base + reg); in tiadc_writel()
69 step_en = ((1 << adc_dev->channels) - 1); in get_adc_step_mask()
[all …]
Dpalmas_gpadc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * palmas-adc.c -- TI PALMAS GPADC.
26 #define MOD_NAME "palmas-gpadc"
29 #define PALMAS_GPADC_TRIMINVALID -1
90 * struct palmas_gpadc - the palmas_gpadc structure
110 * This is the palmas_gpadc structure to store run-time information
131 static struct palmas_adc_event *palmas_gpadc_get_event(struct palmas_gpadc *adc, in palmas_gpadc_get_event() argument
135 if (adc_chan == adc->event0.channel && dir == adc->event0.direction) in palmas_gpadc_get_event()
136 return &adc->event0; in palmas_gpadc_get_event()
138 if (adc_chan == adc->event1.channel && dir == adc->event1.direction) in palmas_gpadc_get_event()
[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 …]
Dstmpe-adc.c1 // SPDX-License-Identifier: GPL-2.0
3 * STMicroelectronics STMPE811 IIO ADC Driver
5 * 4 channel, 10/12-bit ADC
7 * Copyright (C) 2013-2018 Toradex AG <stefan.agner@toradex.com>
62 struct iio_chan_spec const *chan, int *val) in stmpe_read_voltage() argument
66 mutex_lock(&info->lock); in stmpe_read_voltage()
68 reinit_completion(&info->completion); in stmpe_read_voltage()
70 info->channel = (u8)chan->channel; in stmpe_read_voltage()
72 if (info->channel > STMPE_ADC_LAST_NR) { in stmpe_read_voltage()
73 mutex_unlock(&info->lock); in stmpe_read_voltage()
[all …]
Drn5t618-adc.c1 // SPDX-License-Identifier: GPL-2.0+
3 * ADC driver for the RICOH RN5T618 power management chip family
28 /* average 4-time conversion mode */
72 ret = regmap_bulk_read(rn5t618->regmap, reg, data, sizeof(data)); in rn5t618_read_adc_reg()
83 struct rn5t618_adc_data *adc = data; in rn5t618_adc_irq() local
88 regmap_write(adc->rn5t618->regmap, RN5T618_IR_ADC1, 0); in rn5t618_adc_irq()
89 regmap_write(adc->rn5t618->regmap, RN5T618_IR_ADC2, 0); in rn5t618_adc_irq()
91 ret = regmap_read(adc->rn5t618->regmap, RN5T618_IR_ADC3, &r); in rn5t618_adc_irq()
93 dev_err(adc->dev, "failed to read IRQ status: %d\n", ret); in rn5t618_adc_irq()
95 regmap_write(adc->rn5t618->regmap, RN5T618_IR_ADC3, 0); in rn5t618_adc_irq()
[all …]
Dcc10001_adc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2014-2015 Imagination Technologies Ltd.
47 * As per device specification, wait six clock cycles after power-up to
69 writel(val, adc_dev->reg_base + reg); in cc10001_adc_write_reg()
75 return readl(adc_dev->reg_base + reg); in cc10001_adc_read_reg()
81 ndelay(adc_dev->start_delay_ns); in cc10001_adc_power_up()
146 indio_dev = pf->indio_dev; in cc10001_adc_trigger_h()
148 data = adc_dev->buf; in cc10001_adc_trigger_h()
150 mutex_lock(&adc_dev->lock); in cc10001_adc_trigger_h()
152 if (!adc_dev->shared) in cc10001_adc_trigger_h()
[all …]
Dviperboard_adc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Nano River Technologies viperboard IIO ADC driver
27 u8 chan; member
50 struct iio_chan_spec const *chan, in vprbrd_iio_read_raw() argument
56 struct vprbrd_adc *adc = iio_priv(iio_dev); in vprbrd_iio_read_raw() local
57 struct vprbrd *vb = adc->vb; in vprbrd_iio_read_raw()
58 struct vprbrd_adc_msg *admsg = (struct vprbrd_adc_msg *)vb->buf; in vprbrd_iio_read_raw()
62 mutex_lock(&vb->lock); in vprbrd_iio_read_raw()
64 admsg->cmd = VPRBRD_ADC_CMD_GET; in vprbrd_iio_read_raw()
65 admsg->chan = chan->channel; in vprbrd_iio_read_raw()
[all …]
/kernel/linux/linux-6.6/Documentation/devicetree/bindings/iio/adc/
Dti,am3359-adc.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/iio/adc/ti,am3359-adc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: TI AM3359 ADC
10 - Miquel Raynal <miquel.raynal@bootlin.com>
15 - enum:
16 - ti,am3359-adc
17 - ti,am4372-adc
18 - items:
[all …]
/kernel/linux/linux-5.10/drivers/iio/adc/
Dqcom-spmi-adc5.c1 // SPDX-License-Identifier: GPL-2.0
21 #include <dt-bindings/iio/qcom,spmi-vadc.h>
22 #include "qcom-vadc-common.h"
103 * struct adc5_channel_prop - ADC channel property.
112 * @avg_samples: ability to provide single result from the ADC
132 * struct adc5_chip - ADC private structure.
135 * @base: base address for the ADC peripheral.
136 * @nchannels: number of ADC channels.
137 * @chan_props: array of ADC channel properties.
140 * @complete: ADC result notification after interrupt is received.
[all …]
Dmxs-lradc-adc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Freescale MXS LRADC ADC driver
18 #include <linux/mfd/mxs-lradc.h>
43 "mxs-lradc-channel0",
44 "mxs-lradc-channel1",
45 "mxs-lradc-channel2",
46 "mxs-lradc-channel3",
47 "mxs-lradc-channel4",
48 "mxs-lradc-channel5",
52 "mxs-lradc-thresh0",
[all …]
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 …]
Dti_am335x_adc.c2 * TI ADC MFD driver
4 * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/
34 #include <linux/dma-mapping.h>
40 struct dma_chan *chan; member
62 static unsigned int tiadc_readl(struct tiadc_device *adc, unsigned int reg) in tiadc_readl() argument
64 return readl(adc->mfd_tscadc->tscadc_base + reg); in tiadc_readl()
67 static void tiadc_writel(struct tiadc_device *adc, unsigned int reg, in tiadc_writel() argument
70 writel(val, adc->mfd_tscadc->tscadc_base + reg); in tiadc_writel()
77 step_en = ((1 << adc_dev->channels) - 1); in get_adc_step_mask()
78 step_en <<= TOTAL_STEPS - adc_dev->channels + 1; in get_adc_step_mask()
[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 …]
Dstmpe-adc.c1 // SPDX-License-Identifier: GPL-2.0
3 * STMicroelectronics STMPE811 IIO ADC Driver
5 * 4 channel, 10/12-bit ADC
7 * Copyright (C) 2013-2018 Toradex AG <stefan.agner@toradex.com>
62 struct iio_chan_spec const *chan, int *val) in stmpe_read_voltage() argument
66 mutex_lock(&info->lock); in stmpe_read_voltage()
68 reinit_completion(&info->completion); in stmpe_read_voltage()
70 info->channel = (u8)chan->channel; in stmpe_read_voltage()
72 if (info->channel > STMPE_ADC_LAST_NR) { in stmpe_read_voltage()
73 mutex_unlock(&info->lock); in stmpe_read_voltage()
[all …]
Drn5t618-adc.c1 // SPDX-License-Identifier: GPL-2.0+
3 * ADC driver for the RICOH RN5T618 power management chip family
26 /* average 4-time conversion mode */
75 ret = regmap_bulk_read(rn5t618->regmap, reg, data, sizeof(data)); in rn5t618_read_adc_reg()
86 struct rn5t618_adc_data *adc = data; in rn5t618_adc_irq() local
91 regmap_write(adc->rn5t618->regmap, RN5T618_IR_ADC1, 0); in rn5t618_adc_irq()
92 regmap_write(adc->rn5t618->regmap, RN5T618_IR_ADC2, 0); in rn5t618_adc_irq()
94 ret = regmap_read(adc->rn5t618->regmap, RN5T618_IR_ADC3, &r); in rn5t618_adc_irq()
96 dev_err(adc->dev, "failed to read IRQ status: %d\n", ret); in rn5t618_adc_irq()
98 regmap_write(adc->rn5t618->regmap, RN5T618_IR_ADC3, 0); in rn5t618_adc_irq()
[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>
98 int (*init_clk_div)(struct device *dev, struct ingenic_adc *adc);
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()
117 readl(adc->base + JZ_ADC_REG_ADCMD); in ingenic_adc_set_adcmd()
124 adc->base + JZ_ADC_REG_ADCMD); in ingenic_adc_set_adcmd()
[all …]
Dcc10001_adc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2014-2015 Imagination Technologies Ltd.
48 * As per device specification, wait six clock cycles after power-up to
70 writel(val, adc_dev->reg_base + reg); in cc10001_adc_write_reg()
76 return readl(adc_dev->reg_base + reg); in cc10001_adc_read_reg()
82 ndelay(adc_dev->start_delay_ns); in cc10001_adc_power_up()
147 indio_dev = pf->indio_dev; in cc10001_adc_trigger_h()
149 data = adc_dev->buf; in cc10001_adc_trigger_h()
151 mutex_lock(&adc_dev->lock); in cc10001_adc_trigger_h()
153 if (!adc_dev->shared) in cc10001_adc_trigger_h()
[all …]
Dviperboard_adc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Nano River Technologies viperboard IIO ADC driver
27 u8 chan; member
50 struct iio_chan_spec const *chan, in vprbrd_iio_read_raw() argument
56 struct vprbrd_adc *adc = iio_priv(iio_dev); in vprbrd_iio_read_raw() local
57 struct vprbrd *vb = adc->vb; in vprbrd_iio_read_raw()
58 struct vprbrd_adc_msg *admsg = (struct vprbrd_adc_msg *)vb->buf; in vprbrd_iio_read_raw()
62 mutex_lock(&vb->lock); in vprbrd_iio_read_raw()
64 admsg->cmd = VPRBRD_ADC_CMD_GET; in vprbrd_iio_read_raw()
65 admsg->chan = chan->channel; in vprbrd_iio_read_raw()
[all …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/input/touchscreen/
Dti-tsc-adc.txt1 * TI - TSC ADC (Touschscreen and analog digital converter)
5 - mfd
7 "ti,am3359-tscadc" for AM335x/AM437x SoCs
8 "ti,am654-tscadc", "ti,am3359-tscadc" for AM654 SoCs
9 - child "tsc"
10 compatible: Should be "ti,am3359-tsc".
13 ti,x-plate-resistance: X plate resistance
14 ti,coordinate-readouts: The sequencer supports a total of 16
22 remaining 4 can be used by the ADC.
23 ti,wire-config: Different boards could have a different order for
[all …]
/kernel/linux/linux-6.6/drivers/comedi/drivers/
Ds626.c1 // SPDX-License-Identifier: GPL-2.0+
6 * COMEDI - Linux Control and Measurement Device Interface
10 * Copyright (C) 2002-2004 Sensoray Co., Inc.
68 * struct s626_private - Working data for s626 driver.
69 * @ai_cmd_running: non-zero if ai_cmd is running.
74 * @adc_items: number of items in ADC poll list.
75 * @rps_buf: DMA buffer used to hold ADC (RPS1) program.
76 * @ana_buf: DMA buffer used to receive ADC data and hold DAC data.
98 #define S626_INDXMASK(C) (1 << (((C) > 2) ? ((C) * 2 - 1) : ((C) * 2 + 4)))
110 writel(val, dev->mmio + reg); in s626_mc_enable()
[all …]
/kernel/linux/linux-5.10/drivers/staging/comedi/drivers/
Ds626.c1 // SPDX-License-Identifier: GPL-2.0+
6 * COMEDI - Linux Control and Measurement Device Interface
10 * Copyright (C) 2002-2004 Sensoray Co., Inc.
69 * struct s626_private - Working data for s626 driver.
70 * @ai_cmd_running: non-zero if ai_cmd is running.
75 * @adc_items: number of items in ADC poll list.
76 * @rps_buf: DMA buffer used to hold ADC (RPS1) program.
77 * @ana_buf: DMA buffer used to receive ADC data and hold DAC data.
99 #define S626_INDXMASK(C) (1 << (((C) > 2) ? ((C) * 2 - 1) : ((C) * 2 + 4)))
111 writel(val, dev->mmio + reg); in s626_mc_enable()
[all …]
/kernel/linux/linux-5.10/arch/arm64/boot/dts/qcom/
Dpm8916.dtsi1 // SPDX-License-Identifier: GPL-2.0
2 #include <dt-bindings/iio/qcom,spmi-vadc.h>
3 #include <dt-bindings/input/linux-event-codes.h>
4 #include <dt-bindings/interrupt-controller/irq.h>
5 #include <dt-bindings/spmi/spmi.h>
10 compatible = "qcom,pm8916", "qcom,spmi-pmic";
12 #address-cells = <1>;
13 #size-cells = <0>;
16 compatible = "qcom,pm8916-pon";
18 mode-bootloader = <0x2>;
[all …]

12345678910>>...16