Home
last modified time | relevance | path

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

12

/Linux-v6.1/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 vref-p-supply:
35 description: The regulator supply for positive analog voltage reference
[all …]
/Linux-v6.1/drivers/iio/adc/
Dstm32-adc-core.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2016, STMicroelectronics - All Rights Reserved
8 * Inspired from: fsl-imx25-tsadc
26 #include "stm32-adc-core.h"
42 * struct stm32_adc_common_regs - stm32 common registers
45 * @eoc_msk: array of eoc (end of conversion flag) masks in csr for adc1..n
46 * @ovr_msk: array of ovr (overrun flag) masks in csr for adc1..n
62 * struct stm32_adc_priv_cfg - stm32 core compatible configuration data
82 * struct stm32_adc_priv - stm32 ADC core private data
89 * @booster: booster supply reference
[all …]
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 …]
Drcar-gyroadc.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Renesas R-Car GyroADC driver
26 #define DRIVER_NAME "rcar-gyroadc"
68 struct regulator *vref[8]; member
77 const unsigned long clk_mhz = clk_get_rate(priv->clk) / 1000000; in rcar_gyroadc_hw_init()
79 (priv->mode == RCAR_GYROADC_MODE_SELECT_1_MB88101A) ? 10 : 5; in rcar_gyroadc_hw_init()
83 * According to the R-Car Gen2 datasheet Rev. 1.01, Sept 08 2014, in rcar_gyroadc_hw_init()
84 * page 77-7, clock length must be even number. If it's odd number, in rcar_gyroadc_hw_init()
91 writel(0, priv->regs + RCAR_GYROADC_START_STOP); in rcar_gyroadc_hw_init()
94 if (priv->model == RCAR_GYROADC_MODEL_R8A7792) in rcar_gyroadc_hw_init()
[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 …]
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
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 …]
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 …]
Dad7292.c1 // SPDX-License-Identifier: GPL-2.0
91 st->d8[0] = AD7292_RD_FLAG_MSK(addr); in ad7292_spi_reg_read()
93 ret = spi_write_then_read(st->spi, st->d8, 1, &st->d16, 2); in ad7292_spi_reg_read()
97 return be16_to_cpu(st->d16); in ad7292_spi_reg_read()
103 unsigned int shift = 16 - (8 * len); in ad7292_spi_subreg_read()
106 st->d8[0] = AD7292_RD_FLAG_MSK(addr); in ad7292_spi_subreg_read()
107 st->d8[1] = sub_addr; in ad7292_spi_subreg_read()
109 ret = spi_write_then_read(st->spi, st->d8, 2, &st->d16, len); in ad7292_spi_subreg_read()
113 return (be16_to_cpu(st->d16) >> shift); in ad7292_spi_subreg_read()
123 .tx_buf = &st->d8, in ad7292_single_conversion()
[all …]
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-v6.1/drivers/iio/dac/
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 …]
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 …]
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 */
154 /* Range from -5 V to 5 V. Requires Rfb2x connection */
[all …]
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 …]
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 …]
Dltc2688.c1 // SPDX-License-Identifier: GPL-2.0
54 #define LTC2688_DITHER_RAW_MAX_VAL (BIT(14) - 1)
55 #define LTC2688_CH_CALIBBIAS_MAX_VAL (BIT(14) - 1)
92 int vref; member
107 .tx_buf = st->tx_data, in ltc2688_spi_read()
112 .tx_buf = st->tx_data + 3, in ltc2688_spi_read()
113 .rx_buf = st->rx_data, in ltc2688_spi_read()
120 memcpy(st->tx_data, reg, reg_size); in ltc2688_spi_read()
122 ret = spi_sync_transfer(st->spi, xfers, ARRAY_SIZE(xfers)); in ltc2688_spi_read()
126 memcpy(val, &st->rx_data[1], val_size); in ltc2688_spi_read()
[all …]
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
51 outbuf[0] = (data->powerdown_mode + 1) << 4; in mcp4725_suspend()
53 data->powerdown = true; in mcp4725_suspend()
55 return i2c_master_send(data->client, outbuf, 2); in mcp4725_suspend()
65 outbuf[0] = (data->dac_value >> 8) & 0xf; in mcp4725_resume()
66 outbuf[1] = data->dac_value & 0xff; in mcp4725_resume()
67 data->powerdown = false; in mcp4725_resume()
[all …]
Dad5449.c1 // SPDX-License-Identifier: GPL-2.0-only
7 * Author: Lars-Peter Clausen <lars@metafoo.de>
40 * struct ad5449_chip_info - chip specific information
52 * struct ad5449 - driver instance specific data
55 * @vref_reg: vref supply regulators
92 mutex_lock(&st->lock); in ad5449_write()
93 st->data[0] = cpu_to_be16((addr << 12) | val); in ad5449_write()
94 ret = spi_write(st->spi, st->data, 2); in ad5449_write()
95 mutex_unlock(&st->lock); in ad5449_write()
107 .tx_buf = &st->data[0], in ad5449_read()
[all …]
/Linux-v6.1/Documentation/devicetree/bindings/iio/dac/
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/ad3542r.pdf
17 https://www.analog.com/media/en/technical-documentation/data-sheets/ad3552r.pdf
22 - adi,ad3542r
23 - adi,ad3552r
28 spi-max-frequency:
31 reset-gpios:
[all …]
/Linux-v6.1/sound/soc/codecs/
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
52 /* regulator supplies for sgtl5000, VDDD is an optional external supply */
61 /* vddd is optional supply */
100 static const DECLARE_TLV_DB_SCALE(play_tlv, -3000, 100, 0);
101 static const DECLARE_TLV_DB_SCALE(dac_adc_tlv, -9600, 50, 0);
102 static const DECLARE_TLV_DB_SCALE(bypass_tlv, -1500, 300, 0);
124 if (es8328->deemph) { in es8328_set_deemph()
127 if (abs(deemph_settings[i].rate - es8328->playback_fs) < in es8328_set_deemph()
[all …]
Des8326.c1 // SPDX-License-Identifier: GPL-2.0-only
3 // es8326.c -- es8326 ALSA SoC audio driver
6 // Authors: David Yang <yangxiaohua@everest-semi.com>
17 #include <sound/soc-dapm.h>
43 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(dac_vol_tlv, -9550, 50, 0);
44 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(adc_vol_tlv, -9550, 50, 0);
48 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(drc_target_tlv, -3200, 200, 0);
49 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(drc_recovery_tlv, -125, 250, 0);
121 /* Analog Power Supply*/
126 SND_SOC_DAPM_SUPPLY("ADC Vref", ES8326_ANA_PDN, 5, 1, NULL, 0),
[all …]
/Linux-v6.1/drivers/mfd/
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-v6.1/arch/arm/boot/dts/
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-v6.1/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
41 * Support for ads7843 tested on Atmel at91sam926x-EK.
55 * note. The strength of filtering can be set in the board-* specific
78 * driver is used with DMA-based SPI controllers (like atmel_spi) on
79 * systems where main memory is not DMA-coherent (most non-x86 boards).
153 /* leave chip selected when we're done, for quicker re-select? */
160 /*--------------------------------------------------------------------------*/
[all …]
/Linux-v6.1/arch/arm64/boot/dts/rockchip/
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