Home
last modified time | relevance | path

Searched +full:vref +full:- +full:n +full:- +full:supply (Results 1 – 25 of 49) sorted by relevance

12

/linux/Documentation/devicetree/bindings/iio/adc/
H A 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 vref-p-supply:
35 description: The regulator supply for positive analog voltage reference
[all …]
/linux/drivers/iio/adc/
H A Dstm32-adc-core.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2016, STMicroelectronics - All Rights Reserved
8 * Inspired from: fsl-imx25-tsadc
30 #include "stm32-adc-core.h"
46 * struct stm32_adc_common_regs - stm32 common registers
49 * @eoc_msk: array of eoc (end of conversion flag) masks in csr for adc1..n
50 * @ovr_msk: array of ovr (overrun flag) masks in csr for adc1..n
66 * struct stm32_adc_priv_cfg - stm32 core compatible configuration data
86 * struct stm32_adc_priv - stm32 ADC core private data
93 * @booster: booster supply reference
[all …]
H A Dad7766.c1 // SPDX-License-Identifier: GPL-2.0-or-later
69 struct iio_dev *indio_dev = pf->indio_dev; in ad7766_trigger_handler()
73 ret = spi_sync(ad7766->spi, &ad7766->msg); in ad7766_trigger_handler()
77 iio_push_to_buffers_with_timestamp(indio_dev, ad7766->data, in ad7766_trigger_handler()
78 pf->timestamp); in ad7766_trigger_handler()
80 iio_trigger_notify_done(indio_dev->trig); in ad7766_trigger_handler()
90 ret = regulator_bulk_enable(ARRAY_SIZE(ad7766->reg), ad7766->reg); in ad7766_preenable()
92 dev_err(&ad7766->spi->dev, "Failed to enable supplies: %d\n", in ad7766_preenable()
97 ret = clk_prepare_enable(ad7766->mclk); in ad7766_preenable()
99 dev_err(&ad7766->spi->dev, "Failed to enable MCLK: %d\n", ret); in ad7766_preenable()
[all …]
H A Dad7173.c1 // SPDX-License-Identifier: GPL-2.0+
7 * AD7172-2/AD7172-4/AD7173-8/AD7175-2
8 * AD7175-8/AD7176-2/AD7177-2
18 #include <linux/clk-provider.h>
146 (pin2) < st->info->num_voltage_in && \
147 (pin2) >= st->info->num_voltage_in_div)
219 24845000, 24845000, 20725000, 20725000, /* 0-3 */
220 15564000, 13841000, 10390000, 10390000, /* 4-7 */
221 4994000, 2499000, 1000000, 500000, /* 8-11 */
222 395500, 200000, 100000, 59890, /* 12-15 */
[all …]
H A 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 …]
H A Dad7768-1.c1 // SPDX-License-Identifier: GPL-2.0
3 * Analog Devices AD7768-1 SPI ADC driver
156 struct regulator *vref; member
185 shift = 32 - (8 * len); in ad7768_spi_reg_read()
186 st->data.d8[0] = AD7768_RD_FLAG_MSK(addr); in ad7768_spi_reg_read()
188 ret = spi_write_then_read(st->spi, st->data.d8, 1, in ad7768_spi_reg_read()
189 &st->data.d32, len); in ad7768_spi_reg_read()
193 return (be32_to_cpu(st->data.d32) >> shift); in ad7768_spi_reg_read()
200 st->data.d8[0] = AD7768_WR_FLAG_MSK(addr); in ad7768_spi_reg_write()
201 st->data.d8[1] = val & 0xFF; in ad7768_spi_reg_write()
[all …]
H A Dad7780.c1 // SPDX-License-Identifier: GPL-2.0
100 gpiod_set_value(st->powerdown_gpio, val); in ad7780_set_mode()
118 voltage_uv = regulator_get_voltage(st->reg); in ad7780_read_raw()
122 *val = voltage_uv * st->gain; in ad7780_read_raw()
123 *val2 = chan->scan_type.realbits - 1; in ad7780_read_raw()
124 st->int_vref_mv = voltage_uv; in ad7780_read_raw()
127 *val = -(1 << (chan->scan_type.realbits - 1)); in ad7780_read_raw()
130 *val = st->odr; in ad7780_read_raw()
136 return -EINVAL; in ad7780_read_raw()
146 const struct ad7780_chip_info *chip_info = st->chip_info; in ad7780_write_raw()
[all …]
H A 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 …]
H A Dti-ads1298.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2023 - 2024 Topic Embedded Products
69 #define ADS1298_REG_CHnSET(n) (0x05 + n) argument
94 /* For reading and writing registers, we need a 3-byte buffer */
96 /* Outputs status word and 'n' 24-bit samples, plus the command byte */
97 #define ADS1298_SPI_RDATA_BUFFER_SIZE(n) (((n) + 1) * 3 + 1) argument
119 * >2 = Multiple DRDY during transfer, lost rdata_xfer_busy - 2 samples
173 .tx_buf = priv->cmd_buffer, in ads1298_write_cmd()
174 .rx_buf = priv->cmd_buffer, in ads1298_write_cmd()
183 priv->cmd_buffer[0] = command; in ads1298_write_cmd()
[all …]
H A Dad7791.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * Author: Lars-Peter Clausen <lars@metafoo.de>
71 .differential = (_channel2 == -1 ? 0 : 1), \
99 __AD7991_CHANNEL(_si, _channel, -1, _address, _bits, \
111 __AD7991_CHANNEL(_si, _channel, -1, _address, _bits, \
112 _storagebits, _shift, "supply", IIO_VOLTAGE, \
244 st->mode &= ~AD7791_MODE_SEL_MASK; in ad7791_set_mode()
245 st->mode |= AD7791_MODE_SEL(mode); in ad7791_set_mode()
247 return ad_sd_write_reg(sd, AD7791_REG_MODE, sizeof(st->mode), st->mode); in ad7791_set_mode()
263 bool unipolar = !!(st->mode & AD7791_MODE_UNIPOLAR); in ad7791_read_raw()
[all …]
/linux/drivers/iio/dac/
H A Dad5764.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Analog devices AD5764, AD5764R, AD5744, AD5744R quad-channel
33 * struct ad5764_chip_info - chip specific information
34 * @int_vref: Value of the internal reference voltage in uV - 0 if external
44 * struct ad5764_state - driver instance specific data
47 * @vref_reg: vref supply regulators
90 .shift = 16 - (_bits), \
130 mutex_lock(&st->lock); in ad5764_write()
131 st->data[0].d32 = cpu_to_be32((reg << 16) | val); in ad5764_write()
133 ret = spi_write(st->spi, &st->data[0].d8[1], 3); in ad5764_write()
[all …]
H A Dad5360.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * multi-channel Digital to Analog Converters driver
50 * struct ad5360_chip_info - chip specific information
54 * @num_vrefs: number of vref supplies for the chip
65 * struct ad5360_state - driver instance specific data
68 * @vref_reg: vref supply regulators
115 .shift = 16 - (bits), \
175 /* The first groups have their own vref, while the remaining groups in ad5360_get_channel_vref_index()
176 * share the last vref */ in ad5360_get_channel_vref_index()
177 i = channel / st->chip_info->channels_per_group; in ad5360_get_channel_vref_index()
[all …]
H A Dad5064.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * AD5024, AD5025, AD5044, AD5045, AD5064, AD5064-1, AD5065, AD5625, AD5625R,
56 * enum ad5064_regmap_type - Register layout variant
68 * struct ad5064_chip_info - chip specific information
69 * @shared_vref: whether the vref supply is shared between channels
71 * internal vref.
91 * struct ad5064_state - driver instance specific data
94 * @vref_reg: vref supply regulators
197 return st->write(st, cmd, addr, val); in ad5064_write()
207 if (st->chip_info->regmap_type == AD5064_REGMAP_LTC) { in ad5064_sync_powerdown_mode()
[all …]
H A Dad5380.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * multi-channel Digital to Analog Converters driver
35 * struct ad5380_chip_info - chip specific information
38 * @int_vref: internal vref in uV
47 * struct ad5380_state - driver instance specific data
50 * @vref_reg: vref supply regulator
51 * @vref: actual reference voltage used in uA
59 int vref; member
86 return sysfs_emit(buf, "%d\n", st->pwr_down); in ad5380_read_dac_powerdown()
101 mutex_lock(&st->lock); in ad5380_write_dac_powerdown()
[all …]
H A Dmcp4725.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * mcp4725.c - Support for Microchip MCP4725/6
9 * driver for the Microchip I2C 12-bit digital-to-analog converter (DAC)
10 * (7-bit I2C slave address 0x60, the three LSBs can be configured in
57 outbuf[0] = (data->powerdown_mode + 1) << 4; in mcp4725_suspend()
59 data->powerdown = true; in mcp4725_suspend()
61 ret = i2c_master_send(data->client, outbuf, 2); in mcp4725_suspend()
65 return -EIO; in mcp4725_suspend()
77 outbuf[0] = (data->dac_value >> 8) & 0xf; in mcp4725_resume()
78 outbuf[1] = data->dac_value & 0xff; in mcp4725_resume()
[all …]
H A Dad5449.c1 // SPDX-License-Identifier: GPL-2.0-only
7 * Author: Lars-Peter Clausen <lars@metafoo.de>
38 * struct ad5449_chip_info - chip specific information
50 * struct ad5449 - driver instance specific data
53 * @vref_reg: vref supply regulators
90 mutex_lock(&st->lock); in ad5449_write()
91 st->data[0] = cpu_to_be16((addr << 12) | val); in ad5449_write()
92 ret = spi_write(st->spi, st->data, 2); in ad5449_write()
93 mutex_unlock(&st->lock); in ad5449_write()
105 .tx_buf = &st->data[0], in ad5449_read()
[all …]
H A Dad3552r.c1 // SPDX-License-Identifier: GPL-2.0-only
27 #define AD3552R_MASK_DEVICE_STATUS(n) BIT(4 + (n)) argument
103 #define AD3552R_REG_ADDR_CH_DAC_16B(ch) (0x2C - (1 - ch) * 2)
108 #define AD3552R_REG_ADDR_CH_INPUT_16B(ch) (0x36 - (1 - ch) * 2)
112 #define AD3552R_REG_ADDR_CH_DAC_24B(ch) (0x3D - (1 - ch) * 3)
117 #define AD3552R_REG_ADDR_CH_INPUT_24B(ch) (0x4B - (1 - ch) * 3)
134 /* Internal source with Vref I/O floating */
136 /* Internal source with Vref I/O at 2.5V */
138 /* External source with Vref I/O as input */
156 /* Range from -5 V to 5 V. Requires Rfb2x connection */
[all …]
/linux/Documentation/devicetree/bindings/iio/dac/
H A Dadi,ad3552r.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
4 ---
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
11 - Nuno Sá <nuno.sa@analog.com>
16 https://www.analog.com/media/en/technical-documentation/data-sheets/ad3541r.pdf
17 https://www.analog.com/media/en/technical-documentation/data-sheets/ad3542r.pdf
18 https://www.analog.com/media/en/technical-documentation/data-sheets/ad3551r.pdf
19 https://www.analog.com/media/en/technical-documentation/data-sheets/ad3552r.pdf
24 - adi,ad3541r
25 - adi,ad3542r
[all …]
/linux/sound/soc/codecs/
H A Des8328.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * es8328.c -- ES8328 ALSA SoC Audio driver
5 * Copyright 2014 Sutajio Ko-Usagi PTE LTD
51 /* regulator supplies for sgtl5000, VDDD is an optional external supply */
60 /* vddd is optional supply */
99 static const DECLARE_TLV_DB_SCALE(play_tlv, -3000, 100, 0);
100 static const DECLARE_TLV_DB_SCALE(dac_adc_tlv, -9600, 50, 0);
101 static const DECLARE_TLV_DB_SCALE(bypass_tlv, -1500, 300, 0);
123 if (es8328->deemph) { in es8328_set_deemph()
126 if (abs(deemph_settings[i].rate - es8328->playback_fs) < in es8328_set_deemph()
[all …]
/linux/drivers/mfd/
H A Dwm8350-core.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * wm8350-core.c -- Device access for Wolfson WM8350
27 #include <linux/mfd/wm8350/supply.h>
42 printk("\n"); \
65 return regmap_update_bits(wm8350->regmap, reg, mask, 0); in wm8350_clear_bits()
71 return regmap_update_bits(wm8350->regmap, reg, mask, mask); in wm8350_set_bits()
80 err = regmap_read(wm8350->regmap, reg, &data); in wm8350_reg_read()
82 dev_err(wm8350->dev, "read from reg R%d failed\n", reg); in wm8350_reg_read()
92 ret = regmap_write(wm8350->regmap, reg, val); in wm8350_reg_write()
95 dev_err(wm8350->dev, "write to reg R%d failed\n", reg); in wm8350_reg_write()
[all …]
/linux/arch/arm/boot/dts/st/
H A Dstm32mp15xx-dhcom-som.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
3 * Copyright (C) 2019-2020 Marek Vasut <marex@denx.de>
6 #include "stm32mp15-pinctrl.dtsi"
7 #include "stm32mp15xxaa-pinctrl.dtsi"
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/mfd/st,stpmic1.h>
24 reserved-memory {
25 #address-cells = <1>;
26 #size-cells = <1>;
30 compatible = "shared-dma-pool";
[all …]
/linux/drivers/input/touchscreen/
H A 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
39 * Support for ads7843 tested on Atmel at91sam926x-EK.
53 * note. The strength of filtering can be set in the board-* specific
76 * driver is used with DMA-based SPI controllers (like atmel_spi) on
77 * systems where main memory is not DMA-coherent (most non-x86 boards).
152 /* leave chip selected when we're done, for quicker re-select? */
159 /*--------------------------------------------------------------------------*/
[all …]
/linux/arch/arm/boot/dts/nxp/imx/
H A Dimx6ull-dhcom-som.dtsi1 // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
6 #include "imx6ull-dhcor-som.dtsi"
10 /delete-property/ spi2;
11 /delete-property/ spi3;
28 stdout-path = "serial0:115200n8";
31 reg_ext_3v3_ref: regulator-ext-3v3-ref {
32 compatible = "regulator-fixed";
33 regulator-always-on;
34 regulator-max-microvolt = <3300000>;
35 regulator-min-microvolt = <3300000>;
[all …]
/linux/arch/arm64/boot/dts/rockchip/
H A Dpx30-ringneck.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
6 /dts-v1/;
8 #include <dt-bindings/leds/common.h>
18 emmc_pwrseq: emmc-pwrseq {
19 compatible = "mmc-pwrseq-emmc";
20 pinctrl-0 = <&emmc_reset>;
21 pinctrl-names = "default";
22 reset-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>;
26 compatible = "gpio-leds";
27 pinctrl-names = "default";
[all …]
H A Drk3568-evb1-v10.dts1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
7 /dts-v1/;
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/leds/common.h>
10 #include <dt-bindings/pinctrl/rockchip.h>
11 #include <dt-bindings/soc/rockchip,vop2.h>
16 compatible = "rockchip,rk3568-evb1-v10", "rockchip,rk3568";
26 stdout-path = "serial2:1500000n8";
29 dc_12v: dc-12v {
30 compatible = "regulator-fixed";
[all …]

12