Home
last modified time | relevance | path

Searched +full:gain +full:- +full:milli (Results 1 – 23 of 23) sorted by relevance

/linux/Documentation/devicetree/bindings/iio/adc/
H A Dadi,ad7380.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Michael Hennerich <Michael.Hennerich@analog.com>
11 - Nuno Sá <nuno.sa@analog.com>
21 * https://www.analog.com/en/products/ad7380-4.html
22 * https://www.analog.com/en/products/ad7381-4.html
23 * https://www.analog.com/en/products/ad7383-4.html
24 * https://www.analog.com/en/products/ad7384-4.html
25 * https://www.analog.com/en/products/ad7386-4.html
[all …]
/linux/include/linux/iio/adc/
H A Dqcom-vadc-common.h1 /* SPDX-License-Identifier: GPL-2.0 */
17 /* Max ADC code represents full-scale range of 1.8V */
35 /* Default decimation - 1024 for rev2, 840 for pmic5 */
48 #define PMI_CHG_SCALE_1 -138890
69 * struct vadc_linear_graph - Represent ADC characteristics.
70 * @dy: numerator slope to calculate the gain.
71 * @dx: denominator slope to calculate the gain.
74 * Each ADC device has different offset and gain parameters which are
84 * enum vadc_scale_fn_type - Scaling function to convert ADC code to
89 * SCALE_PMIC_THERM: Returns result in milli degree's Centigrade.
[all …]
/linux/drivers/hwmon/
H A Dtmp513.c1 // SPDX-License-Identifier: GPL-2.0
15 * Copyright (C) 2019 Eric Tremblay <etremblay@distech-controls.com>
112 // Max possible value is -256 to +256 but datasheet indicated -40 to 125.
114 #define MIN_TEMP_LIMIT -40000
123 #define TMP51X_TEMP_CHANNEL_MASK(n) (GENMASK((n) - 1, 0) << 11)
185 // Set the shift based on the gain: 8 -> 1, 4 -> 2, 2 -> 3, 1 -> 4
188 return 5 - ffs(data->pga_gain); in tmp51x_get_pga_shift()
205 * on the pga gain setting. 1lsb = 10uV in tmp51x_get_value()
209 16 - tmp51x_get_pga_shift(data) : 15); in tmp51x_get_value()
210 *val = DIV_ROUND_CLOSEST(*val * 10 * (long)MILLI, (long)data->shunt_uohms); in tmp51x_get_value()
[all …]
/linux/drivers/iio/adc/
H A Dad4030.c1 // SPDX-License-Identifier: GPL-2.0-only
101 #define AD4030_VREF_MIN_UV (4096 * MILLI)
102 #define AD4030_VREF_MAX_UV (5000 * MILLI)
103 #define AD4030_VIO_THRESHOLD_UV (1400 * MILLI)
109 #define AD4030_TCYC_ADJUSTED_NS (AD4030_TCYC_NS - AD4030_TCNVL_NS)
112 #define AD4632_TCYC_ADJUSTED_NS (AD4632_TCYC_NS - AD4030_TCNVL_NS)
176 * For a chip with 2 hardware channel this will be used to create 2 common-mode
178 * - voltage4
179 * - voltage5
180 * As the common-mode channels are after the differential ones, we compute the
[all …]
H A Dad4170-4.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Analog Devices AD4170-4 ADC driver
6 * Author: Ana-Maria Cusco <ana-maria.cusco@analog.com>
17 #include <linux/clk-provider.h>
81 /* AD4170_CONFIG_A_REG - INTERFACE_CONFIG_A REGISTER */
246 [AD4170_CHAN_SETUP_REG(0) ... AD4170_CHAN_MAP_REG(AD4170_MAX_ADC_CHANNELS - 1)] = 2,
248 * MISC, AFE, FILTER, FILTER_FS, OFFSET, and GAIN register addresses are
249 * also interleaved but MISC, AFE, FILTER, FILTER_FS, OFFSET are 16-bit
250 * while OFFSET, GAIN are 24-bit registers so we can't init them all to
278 AD4170_REF_BUF_PRE, /* Pre-charge referrence buffer */
[all …]
H A Dad4000.c1 // SPDX-License-Identifier: GPL-2.0+
25 #include <linux/iio/buffer-dmaengine.h>
57 .shift = (_offl ? 0 : _storage_bits - _real_bits), \
95 .shift = (_offl ? 0 : _storage_bits - _real_bits), \
122 /* maps adi,sdi-pin property value to enum */
167 /* AD7946, AD7686, AD7688, AD7988-5, AD7693 */
191 /* AD7988-1 */
475 .dev_name = "ad7988-1",
483 .dev_name = "ad7988-5",
543 if (chan->scan_type.sign == 's') in ad4000_fill_scale_tbl()
[all …]
H A Dmax9611.c1 // SPDX-License-Identifier: GPL-2.0
6 * 12-bit ADC interface.
12 * This driver supports input common-mode voltage, current-sense
16 * Op-amp, analog comparator, and watchdog functionalities are not
49 * LSB and offset values depends on selected gain (1x, 4x, 8x)
51 * GAIN LSB (nV) OFFSET (LSB steps)
57 * (((adc_read >> 4) - offset) / ((1 / LSB) * 10^-3)
71 * (((adc_read >> 4) * 1000) - offset) / (1 / 14 * 1000)
77 * max9611 temperature reading: LSB is 480 milli degrees Celsius
113 * max9611_mux_conf - associate ADC mux configuration with register address
[all …]
H A Dad7192.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright 2011-2015 Analog Devices Inc.
12 #include <linux/clk-provider.h>
36 #define AD7192_REG_COMM 0 /* Communications Register (WO, 8-bit) */
37 #define AD7192_REG_STAT 0 /* Status Register (RO, 8-bit) */
38 #define AD7192_REG_MODE 1 /* Mode Register (RW, 24-bit */
39 #define AD7192_REG_CONF 2 /* Configuration Register (RW, 24-bit) */
40 #define AD7192_REG_DATA 3 /* Data Register (RO, 24/32-bit) */
41 #define AD7192_REG_ID 4 /* ID Register (RO, 8-bit) */
42 #define AD7192_REG_GPOCON 5 /* GPOCON Register (RO, 8-bit) */
[all …]
H A Dad7380.c1 // SPDX-License-Identifier: GPL-2.0-only
9 * ad7380/1 : https://www.analog.com/media/en/technical-documentation/data-sheets/AD7380-7381.pdf
10 * ad7383/4 : https://www.analog.com/media/en/technical-documentation/data-sheets/ad7383-7384.pdf
11 …* ad7386/7/8 : https://www.analog.com/media/en/technical-documentation/data-sheets/AD7386-7387-738…
12 * ad7380-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/ad7380-4.pdf
13 * ad7381-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/ad7381-4.pdf
14 …* ad7383/4-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/ad7383-4-ad7384
15 …* ad7386/7/8-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/ad7386-4-7387
16 * ad7389-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/ad7389-4.pdf
17 * adaq4370-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4370-4.pdf
[all …]
/linux/Documentation/iio/
H A Dad7380.rst1 .. SPDX-License-Identifier: GPL-2.0-only
23 * `AD7380-4 <https://www.analog.com/en/products/ad7380-4.html>`_
24 * `AD7381-4 <https://www.analog.com/en/products/ad7381-4.html>`_
25 * `AD7383-4 <https://www.analog.com/en/products/ad7383-4.html>`_
26 * `AD7384-4 <https://www.analog.com/en/products/ad7384-4.html>`_
27 * `AD7386-4 <https://www.analog.com/en/products/ad7386-4.html>`_
28 * `AD7387-4 <https://www.analog.com/en/products/ad7387-4.html>`_
29 * `AD7388-4 <https://www.analog.com/en/products/ad7388-4.html>`_
30 * `AD7389-4 <https://www.analog.com/en/products/ad7389-4.html>`_
31 * `ADAQ4370-4 <https://www.analog.com/en/products/adaq4370-4.html>`_
[all …]
/linux/drivers/iio/pressure/
H A Dst_pressure_core.c1 // SPDX-License-Identifier: GPL-2.0-only
24 * ------------------------------------------
39 * IIO_VAL_INT_PLUS_NANO with a zero integral part and "gain" as decimal part.
40 * Therefore, from (1), "gain" becomes :
41 * gain = 10^9 / (sensitivity * 10)
45 * ---------------------------------------------------------
56 * IIO ABI expects temperature to be expressed as milli degree Celsius such as
110 /* LPS001WP pressure gain */
264 .gain = ST_PRESS_KPASCAL_NANO_SCALE,
334 .gain = ST_PRESS_LPS001WP_FS_AVL_PRESS_GAIN,
[all …]
/linux/drivers/hwmon/pmbus/
H A Dmp2975.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Hardware monitoring driver for MPS Multi-phase Digital VR Controllers
138 return -ENODATA; in mp2975_read_byte_data()
157 return 250 + (val - 1) * 5; in mp2975_vid2direct()
161 return 500 + (val - 1) * 10; in mp2975_vid2direct()
165 return 200 + (val - 1) * 10; in mp2975_vid2direct()
168 return -EINVAL; in mp2975_vid2direct()
176 /* Converts a milli-unit DIRECT value to LINEAR11 format */
192 while (val < MIN_LIN_MANTISSA && exponent > -15) { in mp2975_data2reg_linear11()
193 exponent--; in mp2975_data2reg_linear11()
[all …]
H A Dmp2856.c1 // SPDX-License-Identifier: GPL-2.0-or-later
86 val = -val; in val2linear11()
95 while (val < MIN_LIN_MANTISSA && exponent > -15) { in val2linear11()
96 exponent--; in val2linear11()
100 /* Convert mantissa from milli-units to units */ in val2linear11()
105 mantissa = -mantissa; in val2linear11()
132 ret = (data->vout_format[page] == vid) ? in mp2856_read_vout()
154 * Output value is calculated as: (READ_CSx * 12.5mV - 1.23V) / (Kcs * Rcs) in mp2856_read_phase()
156 val = (ret * 125) - 12300; in mp2856_read_phase()
186 return -ENODATA; in mp2856_read_phases()
[all …]
/linux/drivers/power/supply/
H A Dds2780_battery.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * 1-wire client/driver for the Maxim/Dallas DS2780 Stand-Alone Fuel Gauge IC
7 * Author: Clifton Barnes <cabarnes@indesign-llc.com>
23 /* Current unit measurement in uA for a 1 milli-ohm sense resistor */
25 /* Charge unit measurement in uAh for a 1 milli-ohm sense resistor */
28 #define DS2780_USER_EEPROM_SIZE (DS2780_EEPROM_BLOCK0_END - \
31 #define DS2780_PARAM_EEPROM_SIZE (DS2780_EEPROM_BLOCK1_END - \
58 return w1_ds2780_io(dev_info->w1_dev, buf, addr, count, io); in ds2780_battery_io()
108 ret = ds2780_store_eeprom(dev_info->w1_dev, reg); in ds2780_save_eeprom()
112 ret = ds2780_recall_eeprom(dev_info->w1_dev, reg); in ds2780_save_eeprom()
[all …]
H A Dds2781_battery.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * 1-wire client/driver for the Maxim/Dallas DS2781 Stand-Alone Fuel Gauge IC
21 /* Current unit measurement in uA for a 1 milli-ohm sense resistor */
23 /* Charge unit measurement in uAh for a 1 milli-ohm sense resistor */
26 #define DS2781_USER_EEPROM_SIZE (DS2781_EEPROM_BLOCK0_END - \
29 #define DS2781_PARAM_EEPROM_SIZE (DS2781_EEPROM_BLOCK1_END - \
56 return w1_ds2781_io(dev_info->w1_dev, buf, addr, count, io); in ds2781_battery_io()
112 ret = ds2781_store_eeprom(dev_info->w1_dev, reg); in ds2781_save_eeprom()
116 ret = ds2781_recall_eeprom(dev_info->w1_dev, reg); in ds2781_save_eeprom()
173 * Bits 9 - 3 of the voltage value are in bits 6 - 0 of the in ds2781_get_voltage()
[all …]
/linux/drivers/iio/proximity/
H A Disl29501.c1 // SPDX-License-Identifier: GPL-2.0
8 * 7-bit I2C slave address: 0x57
205 mutex_lock(&isl29501->lock); in isl29501_register_read()
206 if (reg->msb) { in isl29501_register_read()
207 ret = i2c_smbus_read_byte_data(isl29501->client, reg->msb); in isl29501_register_read()
213 if (reg->lsb) { in isl29501_register_read()
214 ret = i2c_smbus_read_byte_data(isl29501->client, reg->lsb); in isl29501_register_read()
219 mutex_unlock(&isl29501->lock); in isl29501_register_read()
225 mutex_unlock(&isl29501->lock); in isl29501_register_read()
237 if (!reg->msb && value > U8_MAX) in isl29501_register_write()
[all …]
/linux/sound/soc/codecs/
H A Drt5640.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * rt5640.c -- RT5640/RT5639 ALSA SoC audio codec driver
27 #include <sound/soc-dapm.h>
340 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
341 static const DECLARE_TLV_DB_MINMAX(dac_vol_tlv, -6562, 0);
342 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
343 static const DECLARE_TLV_DB_MINMAX(adc_vol_tlv, -1762, 3000);
373 /* Class D speaker gain ratio */
432 SOC_DOUBLE_TLV("ADC Boost Gain", RT5640_ADC_BST_VOL,
435 /* Class D speaker gain ratio */
[all …]
H A Dwcd934x.c1 // SPDX-License-Identifier: GPL-2.0
6 #include <linux/clk-provider.h>
21 #include <sound/soc-dapm.h>
23 #include "wcd-clsh-v2.h"
24 #include "wcd-common.h"
25 #include "wcd-mbhc-v
[all...]
/linux/sound/pci/asihpi/
H A Dhpi_internal.h1 /* SPDX-License-Identifier: GPL-2.0-only */
5 Copyright (C) 1997-2012 AudioScience Inc. <support@audioscience.com>
10 (C) Copyright AudioScience Inc. 1996-2009
29 On error *pLockedMemHandle marked invalid, non-zero returned.
81 typedef char ASSERT_##msg[(cond) ? 1 : -1]
119 /* Get the sub-index of the attribute for a control type */
240 /*------------------------------------------------------------
241 Cobranet Chip Bridge - copied from HMI.H
242 ------------------------------------------------------------*/
268 /*------------------------------------------------------------
[all …]
/linux/drivers/net/ethernet/intel/e1000e/
H A Dphy.c1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 1999 - 2018 Intel Corporation. */
37 * e1000e_check_reset_block_generic - Check if PHY reset is blocked
54 * e1000e_get_phy_id - Retrieve the PHY ID and revision
62 struct e1000_phy_info *phy = &hw->phy; in e1000e_get_phy_id()
67 if (!phy->ops.read_reg) in e1000e_get_phy_id()
75 phy->id = (u32)(phy_id << 16); in e1000e_get_phy_id()
81 phy->id |= (u32)(phy_id & PHY_REVISION_MASK); in e1000e_get_phy_id()
82 phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK); in e1000e_get_phy_id()
84 if (phy->id != 0 && phy->id != PHY_REVISION_MASK) in e1000e_get_phy_id()
[all …]
/linux/Documentation/scsi/
H A Dncr53c8xx.rst1 .. SPDX-License-Identifier: GPL-2.0
11 95170 DEUIL LA BARRE - FRANCE
64 10.4 PCI configuration fix-up boot option
81 16.1 Synchronous timings for 53C875 and 53C860 Ultra-SCSI controllers
82 16.2 Synchronous timings for fast SCSI-2 53C8XX controllers
97 - Gerard Roudier <groudier@free.fr>
101 - Wolfgang Stanglmeier <wolf@cologne.de>
102 - Stefan Esser <se@mi.Uni-Koeln.de>
106 - ncr53c8xx generic driver that supports all the SYM53C8XX family including
109 - sym53c8xx enhanced driver (a.k.a. 896 drivers) that drops support of oldest
[all …]
/linux/drivers/gpu/drm/radeon/
H A Datombios.h2 * Copyright 2006-2007 Advanced Micro Devices, Inc.
214 UCHAR uaFirmWareSignature[4]; /*Signature to distinguish between Atombios and non-atombios,
397 …ONG ulPointerReturnFlag:1; // BYTE_3[7]=1 - Return the pointer to the right Data Block; BYTE_…
403 …ONG ulPointerReturnFlag:1; // BYTE_3[7]=1 - Return the pointer to the right Data Block; BYTE_…
410 …ULONG ulClock; //When returen, it's the re-calculated clock based on given Fb_div Post_Di…
504 …UCHAR ucInputFlag; //Input Flags. ucInputFlag[0] - Strobe(1)/Performance(0)…
536 #define ATOM_PLL_INPUT_FLAG_PLL_STROBE_MODE_EN 1 // 1-StrobeMode, 0-PerformanceMode
544 …bDiv; //Output:UPPER_WORD=FB_DIV_INTEGER, LOWER_WORD=FB_DIV_FRAC shl (16-FB_FRACTION_BITS)
549 … //Input : ATOM_PLL_INPUT_FLAG_PLL_STROBE_MODE_EN: 1-StrobeMode, 0-PerformanceMode
815 // Following function ENABLE sub-function will be used by driver when TMDS/HDMI/LVDS is used, disab…
[all …]
/linux/drivers/gpu/drm/amd/include/
H A Datombios.h2 * Copyright 2006-2007 Advanced Micro Devices, Inc.
107 #define ATOM_SCALER_DISABLE 0 //For Fudo, it's bypass and auto-cengter & no replication
108 #define ATOM_SCALER_CENTER 1 //For Fudo, it's bypass and auto-center & auto replication
110 #define ATOM_SCALER_MULTI_EX 3 //For Fudo only, it's multi-tap mode only used to drive TV or CV,…
222 UCHAR uaFirmWareSignature[4]; //Signature to distinguish between Atombios and non-atombios,
245 UCHAR uaFirmWareSignature[4]; //Signature to distinguish between Atombios and non-atombios,
427 …ONG ulPointerReturnFlag:1; // BYTE_3[7]=1 - Return the pointer to the right Data Block; BYTE_…
433 …ONG ulPointerReturnFlag:1; // BYTE_3[7]=1 - Return the pointer to the right Data Block; BYTE_…
440 …ULONG ulClock; //When returen, it's the re-calculated clock based on given Fb_div Post_Di…
538 …UCHAR ucInputFlag; //Input Flags. ucInputFlag[0] - Strobe(1)/Performance(0)…
[all …]