/linux-6.12.1/drivers/hwmon/ |
D | adc128d818.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 17 #include <linux/hwmon-sysfs.h> 61 int vref; /* Reference voltage in mV */ member 81 struct i2c_client *client = data->client; in adc128_update_device() 85 mutex_lock(&data->update_lock); in adc128_update_device() 87 if (time_after(jiffies, data->last_updated + HZ) || !data->valid) { in adc128_update_device() 88 for (i = 0; i < num_inputs[data->mode]; i++) { in adc128_update_device() 93 data->in[0][i] = rv >> 4; in adc128_update_device() 99 data->in[1][i] = rv << 4; in adc128_update_device() 105 data->in[2][i] = rv << 4; in adc128_update_device() [all …]
|
D | ads7828.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ads7828.c - driver for TI ADS7828 8-channel A/D converter and compatibles 17 #include <linux/hwmon-sysfs.h> 29 #define ADS7828_CMD_PD1 0x04 /* Internal vref OFF && A/D ON */ 30 #define ADS7828_CMD_PD3 0x0C /* Internal vref ON && A/D ON */ 31 #define ADS7828_INT_VREF_MV 2500 /* Internal vref is 2.5V, 2500mV */ 32 #define ADS7828_EXT_VREF_MV_MIN 50 /* External vref min value 0.05V */ 33 #define ADS7828_EXT_VREF_MV_MAX 5250 /* External vref max value 5.25V */ 45 /* Command byte C2,C1,C0 - see datasheet */ 57 u8 cmd = ads7828_cmd_byte(data->cmd_byte, attr->index); in ads7828_in_show() [all …]
|
D | adm1177.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright 2015-2019 Analog Devices Inc. 27 * struct adm1177_state - driver instance specific data 42 return i2c_master_recv(st->client, data, num); in adm1177_read_raw() 47 return i2c_smbus_write_byte(st->client, cmd); in adm1177_write_cmd() 56 val = 0xFFULL * alert_threshold_ua * st->r_sense_uohm; in adm1177_write_alert_thr() 62 ret = i2c_smbus_write_byte_data(st->client, ADM1177_REG_ALERT_TH, in adm1177_write_alert_thr() 67 st->alert_threshold_ua = alert_threshold_ua; in adm1177_write_alert_thr() 89 * ((105.84mV / 4096) x raw) / senseResistor(ohm) in adm1177_read() 92 4096 * st->r_sense_uohm); in adm1177_read() [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/iio/adc/ |
D | adi,ad7949.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Charles-Antoine Couret <charles-antoine.couret@essensium.com> 15 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7949.pdf 17 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7682_7689.pdf 22 - adi,ad7682 23 - adi,ad7689 24 - adi,ad7949 29 vrefin-supply: [all …]
|
/linux-6.12.1/drivers/iio/adc/ |
D | vf610_adc.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 31 #define DRIVER_NAME "vf610-adc" 96 /* V at 25°C of 696 mV */ 98 /* V at 25°C of 699 mV */ 165 struct regulator *vref; member 185 struct vf610_adc_feature *adc_feature = &info->adc_feature; in vf610_adc_calculate_rates() 186 unsigned long adck_rate, ipg_rate = clk_get_rate(info->clk); in vf610_adc_calculate_rates() 190 adck_rate = info->max_adck_rate[adc_feature->conv_mode]; in vf610_adc_calculate_rates() 195 adc_feature->clk_div = 1 << fls(divisor + 1); in vf610_adc_calculate_rates() 197 /* fall-back value using a safe divisor */ in vf610_adc_calculate_rates() [all …]
|
D | fsl-imx25-gcq.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2014-2015 Pengutronix, Markus Pargmann <mpa@pengutronix.de> 9 #include <dt-bindings/iio/adc/fsl-imx25-gcq.h> 13 #include <linux/mfd/imx25-tsadc.h> 23 static const char * const driver_name = "mx25-gcq"; 42 struct regulator *vref[4]; member 87 regmap_read(priv->regs, MX25_ADCQ_SR, &stats); in mx25_gcq_irq() 90 regmap_set_bits(priv->regs, MX25_ADCQ_MR, in mx25_gcq_irq() 92 complete(&priv->completed); in mx25_gcq_irq() 96 regmap_clear_bits(priv->regs, MX25_ADCQ_CR, MX25_ADCQ_CR_FQS); in mx25_gcq_irq() [all …]
|
D | ad7949.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* ad7949.c - Analog Devices ADC driver 14/16 bits 4/8 channels 6 * https://www.analog.com/media/en/technical-documentation/data-sheets/AD7949.pdf 33 /* BW: select bandwidth for low-pass filter. Full or Quarter */ 68 * struct ad7949_adc_chip - AD ADC chip 70 * @vref: regulator generating Vref 78 * @buf8b: be16 buffer to exchange data with the device in 8-bit transfers 82 struct regulator *vref; member 98 ad7949_adc->cfg = (val & mask) | (ad7949_adc->cfg & ~mask); in ad7949_spi_write_cfg() 100 switch (ad7949_adc->spi->bits_per_word) { in ad7949_spi_write_cfg() [all …]
|
D | ti-adc108s102.c | 1 // 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 …]
|
D | qcom-pm8xxx-xoadc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 * specific-purpose and general purpose ADC converters and channels. 13 #include <linux/iio/adc/qcom-vadc-common.h> 27 * Qualcomm tree. Their kernel has two out-of-tree drivers for the ADC: 28 * drivers/misc/pmic8058-xoadc.c 29 * drivers/hwmon/pm8xxx-adc.c 126 * @PM8XXX_CHANNEL_INTERNAL: 625mV reference channel 127 * @PM8XXX_CHANNEL_125V: 1250mV reference channel 128 * @PM8XXX_CHANNEL_INTERNAL_2: 325mV reference channel 155 * struct xoadc_channel - encodes channel properties and defaults [all …]
|
D | ti-ads7950.c | 1 // SPDX-License-Identifier: GPL-2.0 12 * Copyright (C) 2013 Texas Instruments Incorporated - https://www.ti.com/ 35 * In case of ACPI, we use the 5000 mV as default for the reference pin. 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 [all …]
|
D | ti-adc12138.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * ADC12130/ADC12132/ADC12138 12-bit plus sign ADC driver 132 .tx_buf = adc->tx_buf, in adc12138_mode_programming() 133 .rx_buf = adc->rx_buf, in adc12138_mode_programming() 139 if (adc->id != adc12138) in adc12138_mode_programming() 142 adc->tx_buf[0] = mode; in adc12138_mode_programming() 144 ret = spi_sync_transfer(adc->spi, &xfer, 1); in adc12138_mode_programming() 148 memcpy(rx_buf, adc->rx_buf, len); in adc12138_mode_programming() 172 u8 mode = (ch_to_mux[channel->channel] << 4) | in __adc12138_start_conv() 173 (channel->differential ? 0 : 0x80); in __adc12138_start_conv() [all …]
|
D | ti-ads8344.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * ADS8344 16-bit 8-Channel ADC driver 26 * Lock protecting access to adc->tx_buff and rx_buff, 79 struct spi_device *spi = adc->spi; in ads8344_adc_conversion() 82 adc->tx_buf = ADS8344_START; in ads8344_adc_conversion() 84 adc->tx_buf |= ADS8344_SINGLE_END; in ads8344_adc_conversion() 85 adc->tx_buf |= ADS8344_CHANNEL(channel); in ads8344_adc_conversion() 86 adc->tx_buf |= ADS8344_CLOCK_INTERNAL; in ads8344_adc_conversion() 88 ret = spi_write(spi, &adc->tx_buf, 1); in ads8344_adc_conversion() 94 ret = spi_read(spi, adc->rx_buf, sizeof(adc->rx_buf)); in ads8344_adc_conversion() [all …]
|
D | mcp320x.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 * ------------ 20 * ------------ 23 * ------------ 72 * struct mcp320x - Microchip SPI ADC instance 78 * @reg: regulator generating Vref 81 * @tx_buf: buffer for @transfer[0] (not used on single-channel converters) 116 return -EINVAL; in mcp320x_channel_to_tx_data() 125 if (adc->chip_info->conv_time) { in mcp320x_adc_conversion() 126 ret = spi_sync(adc->spi, &adc->start_conv_msg); in mcp320x_adc_conversion() [all …]
|
D | ad7124.c | 1 // SPDX-License-Identifier: GPL-2.0+ 175 struct regulator *vref[4]; member 203 .name = "ad7124-4", 208 .name = "ad7124-8", 224 diff_new = abs(val - array[i]); in ad7124_find_closest_match() 243 ret = ad_sd_read_reg(&st->sd, addr, bytes, &readval); in ad7124_spi_write_mask() 250 return ad_sd_write_reg(&st->sd, addr, bytes, readval); in ad7124_spi_write_mask() 258 st->adc_control &= ~AD7124_ADC_CTRL_MODE_MSK; in ad7124_set_mode() 259 st->adc_control |= AD7124_ADC_CTRL_MODE(mode); in ad7124_set_mode() 261 return ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL, 2, st->adc_control); in ad7124_set_mode() [all …]
|
D | ti-ads7924.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * IIO driver for Texas Instruments ADS7924 ADC, 12-bit, 4-Channels, I2C 8 * based on iio/adc/ti-ads1015.c 98 * The power-up time is allowed to elapse whenever the device has been shutdown 99 * in idle mode. Power-up time can allow external circuits, such as an 103 * If a power-up time is not required, set the bits to '0' to effectively bypass. 137 /* GPIO descriptor for device hard-reset pin. */ 147 * Set to true when the ADC is switched to the continuous-conversion 148 * mode and exits from a power-down state. This flag is used to avoid 198 if (chan->channel < 0 || chan->channel >= ADS7924_CHANNELS) in ads7924_get_adc_result() [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/input/touchscreen/ |
D | ti,ads7843.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Alexander Stein <alexander.stein@ew.tq-group.com> 11 - Dmitry Torokhov <dmitry.torokhov@gmail.com> 12 - Marek Vasut <marex@denx.de> 21 - ti,ads7843 22 - ti,ads7845 23 - ti,ads7846 24 - ti,ads7873 [all …]
|
/linux-6.12.1/arch/arm/boot/dts/nxp/imx/ |
D | imx53-sk-imx53-atm0700d4.dtsi | 1 // SPDX-License-Identifier: GPL-2.0+ 5 /dts-v1/; 7 #include <dt-bindings/pwm/pwm.h> 8 #include "imx53-sk-imx53.dts" 11 panel: panel-rgb { 12 compatible = "powertip,ph800480t013-idf02"; 21 compatible = "spi-gpio"; 22 #address-cells = <0x1>; 23 #size-cells = <0x0>; 25 num-chipselects = <1>; [all …]
|
/linux-6.12.1/drivers/iio/dac/ |
D | ltc1660.c | 1 // SPDX-License-Identifier: GPL-2.0 57 *val = priv->value[chan->channel]; in ltc1660_read_raw() 60 *val = regulator_get_voltage(priv->vref_reg); in ltc1660_read_raw() 62 dev_err(&priv->spi->dev, "failed to read vref regulator: %d\n", in ltc1660_read_raw() 67 /* Convert to mV */ in ltc1660_read_raw() 69 *val2 = chan->scan_type.realbits; in ltc1660_read_raw() 72 return -EINVAL; in ltc1660_read_raw() 88 return -EINVAL; in ltc1660_write_raw() 90 if (val < 0 || val > GENMASK(chan->scan_type.realbits - 1, 0)) in ltc1660_write_raw() 91 return -EINVAL; in ltc1660_write_raw() [all …]
|
D | ad5761.c | 1 // SPDX-License-Identifier: GPL-2.0-only 30 * struct ad5761_chip_info - chip specific information 31 * @int_vref: Value of the internal reference voltage in mV - 0 if external 54 * struct ad5761_state - driver instance specific data 58 * @vref: actual voltage reference in mVolts 69 int vref; member 119 st->data[0].d32 = cpu_to_be32(AD5761_ADDR(addr) | val); in _ad5761_spi_write() 121 return spi_write(st->spi, &st->data[0].d8[1], 3); in _ad5761_spi_write() 129 mutex_lock(&st->lock); in ad5761_spi_write() 131 mutex_unlock(&st->lock); in ad5761_spi_write() [all …]
|
D | max517.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * max517.c - Support for Maxim MAX517, MAX518 and MAX519 47 struct i2c_client *client = data->client; in max517_set_value() 52 return -EINVAL; in max517_set_value() 61 return -EIO; in max517_set_value() 76 /* Corresponds to Vref / 2^(bits) */ in max517_read_raw() 77 *val = data->vref_mv[chan->channel]; in max517_read_raw() 83 return -EINVAL; in max517_read_raw() 93 ret = max517_set_value(indio_dev, val, chan->channel); in max517_write_raw() 96 ret = -EINVAL; in max517_write_raw() [all …]
|
D | m62332.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * m62332.c - Support for Mitsubishi m62332 DAC 5 * Copyright (c) 2014 Dmitry Eremin-Solenikov 34 struct i2c_client *client = data->client; in m62332_set_value() 38 if (val == data->raw[channel]) in m62332_set_value() 44 mutex_lock(&data->mutex); in m62332_set_value() 47 res = regulator_enable(data->vcc); in m62332_set_value() 54 res = -EIO; in m62332_set_value() 58 data->raw[channel] = val; in m62332_set_value() 61 regulator_disable(data->vcc); in m62332_set_value() [all …]
|
D | ad3552r.c | 1 // SPDX-License-Identifier: GPL-2.0-only 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 */ 158 /* Range from -10 V to 10 V. Requires Rfb4x connection */ [all …]
|
/linux-6.12.1/drivers/media/platform/mediatek/vcodec/decoder/vdec/ |
D | vdec_av1_req_lat_if.c | 1 // SPDX-License-Identifier: GPL-2.0 9 #include <media/videobuf2-dma-contig.h> 22 #define AV1_REF_INVALID_SCALE -1 26 #define AV1_INVALID_IDX -1 39 (((_value_) < 0) ? -AV1_DIV_ROUND_UP_POW2(-(_value_), (_n_)) \ 43 #define BIT_FLAG(x, bit) (!!((x)->flags & (bit))) 44 #define SEGMENTATION_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEGMENTATION_FLAG_##name)) 45 #define QUANT_FLAG(x, name) (!!((x)->flags & V4L2_AV1_QUANTIZATION_FLAG_##name)) 46 #define SEQUENCE_FLAG(x, name) (!!((x)->flags & V4L2_AV1_SEQUENCE_FLAG_##name)) 47 #define FH_FLAG(x, name) (!!((x)->flags & V4L2_AV1_FRAME_FLAG_##name)) [all …]
|
/linux-6.12.1/arch/arm/boot/dts/rockchip/ |
D | rk3128-xpi-3128.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 3 /dts-v1/; 5 #include <dt-bindings/input/input.h> 6 #include <dt-bindings/leds/common.h> 10 model = "Geniatech XPI-3128"; 11 compatible = "geniatech,xpi-3128", "rockchip,rk3128"; 25 stdout-path = &uart1; 28 adc-keys { 29 compatible = "adc-keys"; 30 io-channels = <&saradc 1>; [all …]
|
/linux-6.12.1/drivers/input/touchscreen/ |
D | ads7846.c | 1 // 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 …]
|