Home
last modified time | relevance | path

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

123456789

/Linux-v6.1/arch/arm64/boot/dts/qcom/
Dpm7250b.dtsi1 // SPDX-License-Identifier: BSD-3-Clause
6 #include <dt-bindings/interrupt-controller/irq.h>
7 #include <dt-bindings/spmi/spmi.h>
10 thermal-zones {
11 pm7250b-thermal {
12 polling-delay-passive = <100>;
13 polling-delay = <0>;
15 thermal-sensors = <&pm7250b_temp>;
42 compatible = "qcom,pm7250b", "qcom,spmi-pmic";
44 #address-cells = <1>;
[all …]
Dpm8953.dtsi1 // SPDX-License-Identifier: BSD-3-Clause
4 #include <dt-bindings/iio/qcom,spmi-vadc.h>
5 #include <dt-bindings/interrupt-controller/irq.h>
6 #include <dt-bindings/input/linux-event-codes.h>
7 #include <dt-bindings/spmi/spmi.h>
11 compatible = "qcom,pm8953", "qcom,spmi-pmic";
13 #address-cells = <1>;
14 #size-cells = <0>;
17 compatible = "qcom,pm8916-pon";
19 mode-bootloader = <0x2>;
[all …]
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 …]
Dpm8994.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>
8 thermal-zones {
9 pm8994-thermal {
10 polling-delay-passive = <250>;
11 polling-delay = <1000>;
13 thermal-sensors = <&pm8994_temp>;
[all …]
Dpm6150l.dtsi1 // SPDX-License-Identifier: BSD-3-Clause
4 #include <dt-bindings/iio/qcom,spmi-vadc.h>
5 #include <dt-bindings/interrupt-controller/irq.h>
6 #include <dt-bindings/spmi/spmi.h>
10 compatible = "qcom,pm6150l", "qcom,spmi-pmic";
12 #address-cells = <1>;
13 #size-cells = <0>;
15 pm6150l_adc: adc@3100 {
16 compatible = "qcom,spmi-adc5";
19 #address-cells = <1>;
[all …]
/Linux-v6.1/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>
27 #include "stm32-dfsdm.h"
42 /* 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/
27 #include <linux/dma-mapping.h>
33 struct dma_chan *chan; member
55 static unsigned int tiadc_readl(struct tiadc_device *adc, unsigned int reg) in tiadc_readl() argument
57 return readl(adc->mfd_tscadc->tscadc_base + reg); in tiadc_readl()
60 static void tiadc_writel(struct tiadc_device *adc, unsigned int reg, in tiadc_writel() argument
63 writel(val, adc->mfd_tscadc->tscadc_base + reg); in tiadc_writel()
70 step_en = ((1 << 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>
25 #include <linux/nvmem-consumer.h>
30 #include "stm32-adc-core.h"
35 /* BOOST bit must be set on STM32H7 when ADC clock is above 20MHz */
57 /* 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.
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 …]
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>
102 int (*init_clk_div)(struct device *dev, struct ingenic_adc *adc);
116 struct ingenic_adc *adc = iio_priv(iio_dev); in ingenic_adc_set_adcmd() local
118 mutex_lock(&adc->lock); in ingenic_adc_set_adcmd()
121 readl(adc->base + JZ_ADC_REG_ADCMD); in ingenic_adc_set_adcmd()
128 adc->base + JZ_ADC_REG_ADCMD); in ingenic_adc_set_adcmd()
[all …]
Dintel_mrfld_adc.c1 // SPDX-License-Identifier: GPL-2.0
3 * ADC driver for Basin Cove PMIC
65 struct mrfld_adc *adc = iio_priv(indio_dev); in mrfld_adc_thread_isr() local
67 complete(&adc->completion); in mrfld_adc_thread_isr()
72 struct iio_chan_spec const *chan, in mrfld_adc_single_conv() argument
75 struct mrfld_adc *adc = iio_priv(indio_dev); in mrfld_adc_single_conv() local
76 struct regmap *regmap = adc->regmap; in mrfld_adc_single_conv()
82 reinit_completion(&adc->completion); in mrfld_adc_single_conv()
93 req = mrfld_adc_requests[chan->channel]; in mrfld_adc_single_conv()
98 timeout = wait_for_completion_interruptible_timeout(&adc->completion, in mrfld_adc_single_conv()
[all …]
Daxp20x_adc.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* ADC driver for AXP20X and AXP22X PMICs
5 * Quentin Schulz <quentin.schulz@free-electrons.com>
108 .consumer_dev_name = "axp20x-usb-power-supply",
112 .consumer_dev_name = "axp20x-usb-power-supply",
116 .consumer_dev_name = "axp20x-ac-power-supply",
120 .consumer_dev_name = "axp20x-ac-power-supply",
124 .consumer_dev_name = "axp20x-battery-power-supply",
128 .consumer_dev_name = "axp20x-battery-power-supply",
132 .consumer_dev_name = "axp20x-battery-power-supply",
[all …]
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 …]
Dmen_z188_adc.c1 // SPDX-License-Identifier: GPL-2.0-only
48 struct iio_chan_spec const *chan, in z188_iio_read_raw() argument
53 struct z188_adc *adc = iio_priv(iio_dev); in z188_iio_read_raw() local
59 tmp = readw(adc->base + chan->channel * 4); in z188_iio_read_raw()
62 dev_info(&iio_dev->dev, in z188_iio_read_raw()
63 "Oversampling error on ADC channel %d\n", in z188_iio_read_raw()
64 chan->channel); in z188_iio_read_raw()
65 return -EIO; in z188_iio_read_raw()
71 ret = -EINVAL; in z188_iio_read_raw()
103 struct z188_adc *adc; in men_z188_probe() local
[all …]
/Linux-v6.1/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 …]
Dqcom,spmi-vadc.yaml1 # SPDX-License-Identifier: GPL-2.0-only
3 ---
4 $id: http://devicetree.org/schemas/iio/adc/qcom,spmi-vadc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Qualcomm's SPMI PMIC ADC
10 - Andy Gross <agross@kernel.org>
11 - Bjorn Andersson <bjorn.andersson@linaro.org>
14 SPMI PMIC voltage ADC (VADC) provides interface to clients to read
15 voltage. The VADC is a 15-bit sigma-delta ADC.
16 SPMI PMIC5/PMIC7 voltage ADC (ADC) provides interface to clients to read
[all …]
/Linux-v6.1/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 …]
/Linux-v6.1/arch/arm/boot/dts/
Dqcom-pm8226.dtsi1 // SPDX-License-Identifier: BSD-3-Clause
2 #include <dt-bindings/interrupt-controller/irq.h>
3 #include <dt-bindings/spmi/spmi.h>
4 #include <dt-bindings/iio/qcom,spmi-vadc.h>
8 compatible = "qcom,pm8226", "qcom,spmi-pmic";
10 #address-cells = <1>;
11 #size-cells = <0>;
14 compatible = "qcom,pm8941-pwrkey";
18 bias-pull-up;
22 compatible = "qcom,pm8226-charger";
[all …]
/Linux-v6.1/drivers/iio/addac/
Dstx104.c1 // SPDX-License-Identifier: GPL-2.0-only
21 #define STX104_OUT_CHAN(chan) { \ argument
23 .channel = chan, \
28 #define STX104_IN_CHAN(chan, diff) { \ argument
30 .channel = chan, \
31 .channel2 = chan, \
49 * struct stx104_reg - device register structure
50 * @ssr_ad: Software Strobe Register and ADC Data
51 * @achan: ADC Channel
54 * @cir_asr: Clear Interrupts and ADC Status
[all …]
/Linux-v6.1/drivers/extcon/
Dextcon-adc-jack.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * drivers/extcon/extcon-adc-jack.c
5 * Analog Jack extcon driver with ADC-based detection capability.
13 * Modified for calling to IIO to get adc by <anish.singh@samsung.com>
24 #include <linux/extcon/extcon-adc-jack.h>
25 #include <linux/extcon-provider.h>
28 * struct adc_jack_data - internal data for adc_jack device driver
31 * @adc_conditions: list of adc value conditions.
37 * @chan: iio channel being queried.
51 struct iio_channel *chan; member
[all …]

123456789