Home
last modified time | relevance | path

Searched +full:vref +full:- +full:p (Results 1 – 25 of 98) sorted by relevance

1234

/kernel/linux/linux-5.10/Documentation/devicetree/bindings/iio/adc/
Dti,adc12138.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Texas Instruments ADC12138 and similar self-calibrating ADCs
10 - Akinobu Mita <akinobu.mita@gmail.com>
19 - ti,adc12130
20 - ti,adc12132
21 - ti,adc12138
34 spi-max-frequency: true
36 vref-p-supply:
[all …]
/kernel/linux/linux-4.19/Documentation/devicetree/bindings/iio/adc/
Dti-adc12138.txt4 - compatible: Should be one of
8 - reg: SPI chip select number for the device
9 - interrupts: Should contain interrupt for EOC (end of conversion)
10 - clocks: phandle to conversion clock input
11 - spi-max-frequency: Definision as per
12 Documentation/devicetree/bindings/spi/spi-bus.txt
13 - vref-p-supply: The regulator supply for positive analog voltage reference
16 - vref-n-supply: The regulator supply for negative analog voltage reference
17 (Note that this must not go below GND or exceed vref-p)
19 - ti,acquisition-time: The number of conversion clock periods for the S/H's
[all …]
/kernel/linux/linux-4.19/Documentation/devicetree/bindings/iio/dac/
Ddpot-dac.txt5 divided voltage is provided by a vref regulator.
7 .------.
8 .-----------. | |
9 | vref |--' .---.
10 | regulator |--. | |
11 '-----------' | | d |
12 | | p |
14 | | t |<---------+
16 | '---' dac output voltage
18 '------+------------+
[all …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/iio/dac/
Ddpot-dac.txt5 divided voltage is provided by a vref regulator.
7 .------.
8 .-----------. | |
9 | vref |--' .---.
10 | regulator |--. | |
11 '-----------' | | d |
12 | | p |
14 | | t |<---------+
16 | '---' dac output voltage
18 '------+------------+
[all …]
/kernel/linux/linux-5.10/drivers/iio/adc/
Dti-tlc4541.c1 // SPDX-License-Identifier: GPL-2.0-only
91 static irqreturn_t tlc4541_trigger_handler(int irq, void *p) in tlc4541_trigger_handler() argument
93 struct iio_poll_func *pf = p; in tlc4541_trigger_handler()
94 struct iio_dev *indio_dev = pf->indio_dev; in tlc4541_trigger_handler()
98 ret = spi_sync(st->spi, &st->scan_single_msg); in tlc4541_trigger_handler()
102 iio_push_to_buffers_with_timestamp(indio_dev, st->rx_buf, in tlc4541_trigger_handler()
106 iio_trigger_notify_done(indio_dev->trig); in tlc4541_trigger_handler()
112 int vref; in tlc4541_get_range() local
114 vref = regulator_get_voltage(st->reg); in tlc4541_get_range()
115 if (vref < 0) in tlc4541_get_range()
[all …]
Drockchip_saradc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
51 struct regulator *vref; member
61 writel_relaxed(0, info->regs + SARADC_CTRL); in rockchip_saradc_power_down()
67 reinit_completion(&info->completion); in rockchip_saradc_conversion()
70 writel_relaxed(8, info->regs + SARADC_DLY_PU_SOC); in rockchip_saradc_conversion()
72 info->last_chan = chan; in rockchip_saradc_conversion()
76 | (chan->channel & SARADC_CTRL_CHN_MASK) in rockchip_saradc_conversion()
78 info->regs + SARADC_CTRL); in rockchip_saradc_conversion()
80 if (!wait_for_completion_timeout(&info->completion, SARADC_TIMEOUT)) in rockchip_saradc_conversion()
81 return -ETIMEDOUT; in rockchip_saradc_conversion()
[all …]
Dad7923.c1 // SPDX-License-Identifier: GPL-2.0-only
46 #define EXTRACT(val, dec, bits) (((val) >> (dec)) & ((1 << (bits)) - 1))
170 for_each_set_bit(i, active_scan_mask, indio_dev->num_channels - 1) { in ad7923_update_scan_mode()
173 st->settings; in ad7923_update_scan_mode()
175 st->tx_buf[len++] = cpu_to_be16(cmd); in ad7923_update_scan_mode()
178 st->ring_xfer[0].tx_buf = &st->tx_buf[0]; in ad7923_update_scan_mode()
179 st->ring_xfer[0].len = len; in ad7923_update_scan_mode()
180 st->ring_xfer[0].cs_change = 1; in ad7923_update_scan_mode()
182 spi_message_init(&st->ring_msg); in ad7923_update_scan_mode()
183 spi_message_add_tail(&st->ring_xfer[0], &st->ring_msg); in ad7923_update_scan_mode()
[all …]
Dad7298.c1 // SPDX-License-Identifier: GPL-2.0-only
30 #define AD7298_CH(x) BIT(13 - (x)) /* channel select */
83 .scan_index = -1,
113 scan_count = bitmap_weight(active_scan_mask, indio_dev->masklength); in ad7298_update_scan_mode()
115 command = AD7298_WRITE | st->ext_ref; in ad7298_update_scan_mode()
121 st->tx_buf[0] = cpu_to_be16(command); in ad7298_update_scan_mode()
124 st->ring_xfer[0].tx_buf = &st->tx_buf[0]; in ad7298_update_scan_mode()
125 st->ring_xfer[0].len = 2; in ad7298_update_scan_mode()
126 st->ring_xfer[0].cs_change = 1; in ad7298_update_scan_mode()
127 st->ring_xfer[1].tx_buf = &st->tx_buf[1]; in ad7298_update_scan_mode()
[all …]
Dti-ads8688.c1 // SPDX-License-Identifier: GPL-2.0-only
44 * enum ads8688_range - ADS8688 reference voltage range
45 * @ADS8688_PLUSMINUS25VREF: Device is configured for input range ±2.5 * VREF
46 * @ADS8688_PLUSMINUS125VREF: Device is configured for input range ±1.25 * VREF
47 * @ADS8688_PLUSMINUS0625VREF: Device is configured for input range ±0.625 * VREF
48 * @ADS8688_PLUS25VREF: Device is configured for input range 0 - 2.5 * VREF
49 * @ADS8688_PLUS125VREF: Device is configured for input range 0 - 1.25 * VREF
93 .offset = -(1 << (ADS8688_REALBITS - 1)),
98 .offset = -(1 << (ADS8688_REALBITS - 1)),
103 .offset = -(1 << (ADS8688_REALBITS - 1)),
[all …]
Dti-ads7950.c1 // SPDX-License-Identifier: GPL-2.0
12 * Copyright (C) 2013 Texas Instruments Incorporated - https://www.ti.com/
36 * Device tree users encode that via the vref-supply regulator.
54 (((val) >> (dec)) & ((1 << (bits)) - 1))
61 (TI_ADS7950_MAN_CMD(TI_ADS7950_CR_WRITE | st->cmd_settings_bitmask))
64 (TI_ADS7950_GPIO_CMD(st->gpio_cmd_settings_bitmask))
84 * [0-3] GPIO signal
87 * [6] Sets Vref range1(2.5v) or range2(5v)
95 * [0-3] GPIO direction
96 * [4-6] Different GPIO alarm mode configurations
[all …]
Dad7768-1.c1 // SPDX-License-Identifier: GPL-2.0
3 * Analog Devices AD7768-1 SPI ADC driver
156 struct regulator *vref; member
184 shift = 32 - (8 * len); in ad7768_spi_reg_read()
185 st->data.d8[0] = AD7768_RD_FLAG_MSK(addr); in ad7768_spi_reg_read()
187 ret = spi_write_then_read(st->spi, st->data.d8, 1, in ad7768_spi_reg_read()
188 &st->data.d32, len); in ad7768_spi_reg_read()
192 return (be32_to_cpu(st->data.d32) >> shift); in ad7768_spi_reg_read()
199 st->data.d8[0] = AD7768_WR_FLAG_MSK(addr); in ad7768_spi_reg_write()
200 st->data.d8[1] = val & 0xFF; in ad7768_spi_reg_write()
[all …]
Dti-adc108s102.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (c) 2013-2015 Intel Corporation.
29 * In case of ACPI, we use the hard-wired 5000 mV of the Galileo and IOT2000
31 * via the vref-supply regulator.
38 * chips. The ADC108S102 effectively returns a 12-bit result with the 2
39 * least-significant bits unset.
45 * 16-bit SPI command format:
47 * [13:11] 3-bit channel address
53 * 16-bit SPI response format:
55 * [11:0] 12-bit ADC sample (for ADC108S102, [1:0] will always be 0).
[all …]
Dad799x.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright (C) 2010-2011 Michael Hennerich, Analog Devices Inc.
7 * Copyright (C) 2008-2010 Jonathan Cameron
10 * Copyright (C) 2002-2004 Stefan Eletzhofer
100 * struct ad799x_chip_config - chip specific information
112 * struct ad799x_chip_info - chip specific information
127 struct regulator *vref; member
137 switch (st->id) { in ad799x_write_config()
140 return i2c_smbus_write_word_swapped(st->client, AD7998_CONF_REG, in ad799x_write_config()
145 return i2c_smbus_write_byte_data(st->client, AD7998_CONF_REG, in ad799x_write_config()
[all …]
Dad7766.c1 // SPDX-License-Identifier: GPL-2.0-or-later
67 static irqreturn_t ad7766_trigger_handler(int irq, void *p) in ad7766_trigger_handler() argument
69 struct iio_poll_func *pf = p; in ad7766_trigger_handler()
70 struct iio_dev *indio_dev = pf->indio_dev; in ad7766_trigger_handler()
74 ret = spi_sync(ad7766->spi, &ad7766->msg); in ad7766_trigger_handler()
78 iio_push_to_buffers_with_timestamp(indio_dev, ad7766->data, in ad7766_trigger_handler()
79 pf->timestamp); in ad7766_trigger_handler()
81 iio_trigger_notify_done(indio_dev->trig); in ad7766_trigger_handler()
91 ret = regulator_bulk_enable(ARRAY_SIZE(ad7766->reg), ad7766->reg); in ad7766_preenable()
93 dev_err(&ad7766->spi->dev, "Failed to enable supplies: %d\n", in ad7766_preenable()
[all …]
/kernel/linux/linux-4.19/drivers/iio/adc/
Dti-tlc4541.c93 static irqreturn_t tlc4541_trigger_handler(int irq, void *p) in tlc4541_trigger_handler() argument
95 struct iio_poll_func *pf = p; in tlc4541_trigger_handler()
96 struct iio_dev *indio_dev = pf->indio_dev; in tlc4541_trigger_handler()
100 ret = spi_sync(st->spi, &st->scan_single_msg); in tlc4541_trigger_handler()
104 iio_push_to_buffers_with_timestamp(indio_dev, st->rx_buf, in tlc4541_trigger_handler()
108 iio_trigger_notify_done(indio_dev->trig); in tlc4541_trigger_handler()
114 int vref; in tlc4541_get_range() local
116 vref = regulator_get_voltage(st->reg); in tlc4541_get_range()
117 if (vref < 0) in tlc4541_get_range()
118 return vref; in tlc4541_get_range()
[all …]
Dad7923.c7 * Licensed under the GPL-2.
52 #define EXTRACT(val, dec, bits) ((val >> dec) & ((1 << bits) - 1))
142 st->settings; in ad7923_update_scan_mode()
144 st->tx_buf[len++] = cpu_to_be16(cmd); in ad7923_update_scan_mode()
147 st->ring_xfer[0].tx_buf = &st->tx_buf[0]; in ad7923_update_scan_mode()
148 st->ring_xfer[0].len = len; in ad7923_update_scan_mode()
149 st->ring_xfer[0].cs_change = 1; in ad7923_update_scan_mode()
151 spi_message_init(&st->ring_msg); in ad7923_update_scan_mode()
152 spi_message_add_tail(&st->ring_xfer[0], &st->ring_msg); in ad7923_update_scan_mode()
155 st->ring_xfer[i + 1].rx_buf = &st->rx_buf[i]; in ad7923_update_scan_mode()
[all …]
Dti-ads7950.c1 // SPDX-License-Identifier: GPL-2.0
12 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
35 * Device tree users encode that via the vref-supply regulator.
50 (((val) >> (dec)) & ((1 << (bits)) - 1))
113 .shift = 12 - (bits), \
253 for_each_set_bit(i, active_scan_mask, indio_dev->num_channels) { in ti_ads7950_update_scan_mode()
254 cmd = TI_ADS7950_CR_WRITE | TI_ADS7950_CR_CHAN(i) | st->settings; in ti_ads7950_update_scan_mode()
255 st->tx_buf[len++] = cpu_to_be16(cmd); in ti_ads7950_update_scan_mode()
262 st->ring_xfer[i].tx_buf = &st->tx_buf[i]; in ti_ads7950_update_scan_mode()
264 st->ring_xfer[i].rx_buf = &st->rx_buf[i - 2]; in ti_ads7950_update_scan_mode()
[all …]
Dad7298.c6 * Licensed under the GPL-2.
31 #define AD7298_CH(x) BIT(13 - (x)) /* channel select */
84 .scan_index = -1,
114 scan_count = bitmap_weight(active_scan_mask, indio_dev->masklength); in ad7298_update_scan_mode()
116 command = AD7298_WRITE | st->ext_ref; in ad7298_update_scan_mode()
122 st->tx_buf[0] = cpu_to_be16(command); in ad7298_update_scan_mode()
125 st->ring_xfer[0].tx_buf = &st->tx_buf[0]; in ad7298_update_scan_mode()
126 st->ring_xfer[0].len = 2; in ad7298_update_scan_mode()
127 st->ring_xfer[0].cs_change = 1; in ad7298_update_scan_mode()
128 st->ring_xfer[1].tx_buf = &st->tx_buf[1]; in ad7298_update_scan_mode()
[all …]
Dti-ads8688.c47 * enum ads8688_range - ADS8688 reference voltage range
48 * @ADS8688_PLUSMINUS25VREF: Device is configured for input range ±2.5 * VREF
49 * @ADS8688_PLUSMINUS125VREF: Device is configured for input range ±1.25 * VREF
50 * @ADS8688_PLUSMINUS0625VREF: Device is configured for input range ±0.625 * VREF
51 * @ADS8688_PLUS25VREF: Device is configured for input range 0 - 2.5 * VREF
52 * @ADS8688_PLUS125VREF: Device is configured for input range 0 - 1.25 * VREF
96 .offset = -(1 << (ADS8688_REALBITS - 1)),
101 .offset = -(1 << (ADS8688_REALBITS - 1)),
106 .offset = -(1 << (ADS8688_REALBITS - 1)),
127 ads8688_range_def[0].scale * st->vref_mv, in ads8688_show_scales()
[all …]
Dti-adc108s102.c4 * Copyright (c) 2013-2015 Intel Corporation.
36 * In case of ACPI, we use the hard-wired 5000 mV of the Galileo and IOT2000
38 * via the vref-supply regulator.
45 * chips. The ADC108S102 effectively returns a 12-bit result with the 2
46 * least-significant bits unset.
52 * 16-bit SPI command format:
54 * [13:11] 3-bit channel address
60 * 16-bit SPI response format:
62 * [11:0] 12-bit ADC sample (for ADC108S102, [1:0] will always be 0).
85 * rx_buf: 1 dummy response, 8 channel responses, plus 64-bit timestamp
[all …]
Dad799x.c3 * Copyright (C) 2010-2011 Michael Hennerich, Analog Devices Inc.
6 * Copyright (C) 2008-2010 Jonathan Cameron
9 * Copyright (C) 2002-2004 Stefan Eletzhofer
104 * struct ad799x_chip_config - chip specific information
116 * struct ad799x_chip_info - chip specific information
131 struct regulator *vref; member
141 switch (st->id) { in ad799x_write_config()
144 return i2c_smbus_write_word_swapped(st->client, AD7998_CONF_REG, in ad799x_write_config()
149 return i2c_smbus_write_byte_data(st->client, AD7998_CONF_REG, in ad799x_write_config()
153 st->config = val; in ad799x_write_config()
[all …]
/kernel/linux/linux-5.10/drivers/iio/dac/
Ddpot-dac.c1 // SPDX-License-Identifier: GPL-2.0
13 * divided voltage is provided by a vref regulator.
15 * .------.
16 * .-----------. | |
17 * | vref |--' .---.
18 * | regulator |--. | |
19 * '-----------' | | d |
20 * | | p |
22 * | | t |<---------+
24 * | '---' dac output voltage
[all …]
/kernel/linux/linux-4.19/drivers/iio/dac/
Ddpot-dac.c16 * divided voltage is provided by a vref regulator.
18 * .------.
19 * .-----------. | |
20 * | vref |--' .---.
21 * | regulator |--. | |
22 * '-----------' | | d |
23 * | | p |
25 * | | t |<---------+
27 * | '---' dac output voltage
29 * '------+------------+
[all …]
/kernel/linux/linux-5.10/drivers/input/touchscreen/
Dads7846.c1 // SPDX-License-Identifier: GPL-2.0-only
10 * - corgi_ts.c
11 * Copyright (C) 2004-2005 Richard Purdie
12 * - omap_ts.[hc], ads7846.h, ts_osk.c
42 * Support for ads7843 tested on Atmel at91sam926x-EK.
56 * note. The strength of filtering can be set in the board-* specific
70 * with msbs zeroed). Instead, we read them as two 8-bit values,
83 * driver is used with DMA-based SPI controllers (like atmel_spi) on
84 * systems where main memory is not DMA-coherent (most non-x86 boards).
90 /* for ads7845 with mpc5121 psc spi we use 3-byte buffers */
[all …]
/kernel/linux/linux-4.19/drivers/input/touchscreen/
Dads7846.c9 * - corgi_ts.c
10 * Copyright (C) 2004-2005 Richard Purdie
11 * - omap_ts.[hc], ads7846.h, ts_osk.c
43 * Support for ads7843 tested on Atmel at91sam926x-EK.
57 * note. The strength of filtering can be set in the board-* specific
71 * with msbs zeroed). Instead, we read them as two 8-bit values,
84 * driver is used with DMA-based SPI controllers (like atmel_spi) on
85 * systems where main memory is not DMA-coherent (most non-x86 boards).
91 /* for ads7845 with mpc5121 psc spi we use 3-byte buffers */
136 bool stopped; /* P: lock */
[all …]

1234