Home
last modified time | relevance | path

Searched +full:gain +full:- +full:offset (Results 1 – 25 of 499) sorted by relevance

12345678910>>...20

/openbmc/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/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 …]
/openbmc/linux/include/linux/
H A Datmel-isc-media.h1 /* SPDX-License-Identifier: GPL-2.0-only */
13 * 4 gain controls, sliders, for each of the BAYER components: R, B, GR, GB.
16 * 4 offset controls, sliders, for each of the BAYER components: R, B, GR, GB.
18 * 1:12:0 with a default value of 0 (+/- 0)
30 * configure the gain/offsets directly.
32 * pressed, the driver will perform one-time-adjustment, (preferably with color
40 /* Red component gain control */
42 /* Blue component gain control */
44 /* Green Red component gain control */
46 /* Green Blue gain control */
[all …]
/openbmc/linux/drivers/iio/adc/
H A Dqcom-spmi-iadc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
94 * struct iadc_chip - IADC Current ADC device structure.
97 * @base: base offset for the ADC peripheral.
100 * @offset: Raw offset values for the internal and external channels.
101 * @gain: Raw gain of the channels.
111 u16 offset[2]; member
112 u16 gain; member
117 static int iadc_read(struct iadc_chip *iadc, u16 offset, u8 *data) in iadc_read() argument
122 ret = regmap_read(iadc->regmap, iadc->base + offset, &val); in iadc_read()
[all …]
H A Dab8500-gpadc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson SA 2010
54 /* 0 = use VTVOUT, 1 = use VRTC as pull-up supply for battery temp NTC */
63 * the bit layout is the same for SW and HW conversion set-up
163 #define AB8500_ADC_CH_IBAT_MIN (-6000) /* mA range measured by ADC for ibat */
165 #define AB8500_ADC_CH_IBAT_MIN_V (-60) /* mV range measured by ADC for ibat */
167 #define AB8500_GPADC_IBAT_VDROP_L (-56) /* mV */
170 /* This is used to not lose precision when dividing to get gain and offset */
174 * when dividing to get ibat gain.
192 * struct ab8500_adc_cal_data - Table for storing gain and offset for the
[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
51 * LSB and offset values depends on selected gain (1x, 4x, 8x)
53 * GAIN LSB (nV) OFFSET (LSB steps)
59 * (((adc_read >> 4) - offset) / ((1 / LSB) * 10^-3)
70 * max9611 common input mode (CIM): LSB is 14mV, with 14mV offset at 25 C
73 * (((adc_read >> 4) * 1000) - offset) / (1 / 14 * 1000)
115 * max9611_mux_conf - associate ADC mux configuration with register address
[all …]
H A Dpalmas_gpadc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * palmas-adc.c -- TI PALMAS GPADC.
26 #define MOD_NAME "palmas-gpadc"
29 #define PALMAS_GPADC_TRIMINVALID -1
39 int gain; /* calculated from above (after reading trim regs) */ member
40 int offset; /* calculated from above (after reading trim regs) */ member
51 .gain = PALMAS_TO_BE_CALCULATED, \
52 .offset = PALMAS_TO_BE_CALCULATED, \
90 * struct palmas_gpadc - the palmas_gpadc structure
110 * This is the palmas_gpadc structure to store run-time information
[all …]
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt76x2/
H A Dphy.c1 // SPDX-License-Identifier: ISC
13 mt76x2_adjust_high_lna_gain(struct mt76x02_dev *dev, int reg, s8 offset) in mt76x2_adjust_high_lna_gain() argument
15 s8 gain; in mt76x2_adjust_high_lna_gain() local
17 gain = FIELD_GET(MT_BBP_AGC_LNA_HIGH_GAIN, in mt76x2_adjust_high_lna_gain()
19 gain -= offset / 2; in mt76x2_adjust_high_lna_gain()
20 mt76_rmw_field(dev, MT_BBP(AGC, reg), MT_BBP_AGC_LNA_HIGH_GAIN, gain); in mt76x2_adjust_high_lna_gain()
24 mt76x2_adjust_agc_gain(struct mt76x02_dev *dev, int reg, s8 offset) in mt76x2_adjust_agc_gain() argument
26 s8 gain; in mt76x2_adjust_agc_gain() local
28 gain = FIELD_GET(MT_BBP_AGC_GAIN, mt76_rr(dev, MT_BBP(AGC, reg))); in mt76x2_adjust_agc_gain()
29 gain += offset; in mt76x2_adjust_agc_gain()
[all …]
/openbmc/linux/include/uapi/linux/
H A Domap3isp.h1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
5 * TI OMAP3 ISP - User-space API
25 * 02110-1301 USA
41 * VIDIOC_OMAP3ISP_AF_CFG: Set auto-focus module configuration
121 * struct omap3isp_h3a_aewb_config - AE AWB configuration reset values
123 * @win_height: Window Height. Range 2 - 256, even values only.
124 * @win_width: Window Width. Range 6 - 256, even values only.
125 * @ver_win_count: Vertical Window Count. Range 1 - 128.
126 * @hor_win_count: Horizontal Window Count. Range 1 - 36.
127 * @ver_win_start: Vertical Window Start. Range 0 - 4095.
[all …]
/openbmc/linux/drivers/comedi/drivers/
H A Dni_at_ao.c1 // SPDX-License-Identifier: GPL-2.0+
4 * Driver for NI AT-AO-6/10 boards
6 * COMEDI - Linux Control and Measurement Device Interface
12 * Description: National Instruments AT-AO-6/10
13 * Devices: [National Instruments] AT-AO-6 (at-ao-6), AT-AO-10 (at-ao-10)
19 * [0] - I/O port base address
20 * [1] - IRQ (unused)
21 * [2] - DMA (unused)
22 * [3] - analog output range, set by jumpers on hardware
23 * 0 for -10 to 10V bipolar
[all …]
/openbmc/linux/drivers/net/wireless/broadcom/b43/
H A Dphy_a.h1 /* SPDX-License-Identifier: GPL-2.0 */
9 #define B43_PHY_VERSION_OFDM B43_PHY_OFDM(0x00) /* Versioning register for A-PHY */
16 #define B43_PHY_LPFGAINCTL B43_PHY_OFDM(0x20) /* LPF Gain control */
31 #define B43_PHY_OTABLEOFF 0x03FF /* OFDM table offset (see below) */
52 #define B43_PHY_DIVSRCHIDX B43_PHY_OFDM(0xA8) /* Divider search gain/index */
56 #define B43_PHY_DIVSRCHGAINBACK B43_PHY_OFDM(0xAD) /* Divider search gain back */
57 #define B43_PHY_DIVSRCHGAINCHNG B43_PHY_OFDM(0xAE) /* Divider search gain change */
62 #define B43_PHY_GAIN_LTBASE B43_PHY_OFDM(0x3C0) /* Gain lookup table base */
65 #define B43_OFDMTAB(number, offset) (((number) << B43_PHY_OTABLENR_SHIFT) | (offset)) argument
98 u16 b43_ofdmtab_read16(struct b43_wldev *dev, u16 table, u16 offset);
[all …]
H A Dphy_g.h1 /* SPDX-License-Identifier: GPL-2.0 */
5 /* OFDM PHY registers are defined in the A-PHY header. */
9 #define B43_PHY_VERSION_CCK B43_PHY_CCK(0x00) /* Versioning register for B-PHY */
24 /* Extended G-PHY Registers */
26 #define B43_PHY_GTABCTL B43_PHY_EXTG(0x03) /* G-PHY table control (see below) */
27 #define B43_PHY_GTABOFF 0x03FF /* G-PHY table offset (see below) */
28 #define B43_PHY_GTABNR 0xFC00 /* G-PHY table number (see below) */
30 #define B43_PHY_GTABDATA B43_PHY_EXTG(0x04) /* G-PHY table data */
49 /*** G-PHY table numbers */
50 #define B43_GTAB(number, offset) (((number) << B43_PHY_GTABNR_SHIFT) | (offset)) argument
[all …]
H A Dphy_n.h1 /* SPDX-License-Identifier: GPL-2.0 */
9 /* N-PHY registers. */
18 #define B43_NPHY_4WI_ADDR B43_PHY_N(0x00B) /* Four-wire bus address */
19 #define B43_NPHY_4WI_DATAHI B43_PHY_N(0x00C) /* Four-wire bus data high */
20 #define B43_NPHY_4WI_DATALO B43_PHY_N(0x00D) /* Four-wire bus data low */
21 #define B43_NPHY_BIST_STAT0 B43_PHY_N(0x00E) /* Built-in self test status 0 */
22 #define B43_NPHY_BIST_STAT1 B43_PHY_N(0x00F) /* Built-in self test status 1 */
28 #define B43_NPHY_C1_CGAINI B43_PHY_N(0x01C) /* Core 1 compute gain info */
29 #define B43_NPHY_C1_CGAINI_GAINBKOFF 0x001F /* Gain backoff */
31 #define B43_NPHY_C1_CGAINI_CLIPGBKOFF 0x03E0 /* Clip gain backoff */
[all …]
H A Dtables_nphy.h1 /* SPDX-License-Identifier: GPL-2.0 */
68 /* Get entry with workaround values for gain ctl. Does not return NULL. */
73 /* The N-PHY tables. */
78 #define B43_NTAB8(table, offset) (((table) << 10) | (offset) | B43_NTAB_8BIT) argument
79 #define B43_NTAB16(table, offset) (((table) << 10) | (offset) | B43_NTAB_16BIT) argument
80 #define B43_NTAB32(table, offset) (((table) << 10) | (offset) | B43_NTAB_32BIT) argument
82 /* Static N-PHY tables */
112 /* Volatile N-PHY tables */
121 #define B43_NTAB_C0_GAINCTL B43_NTAB32(0x1A, 0x0C0) /* Gain Control Lookup Table Core 0 */
131 #define B43_NTAB_C1_GAINCTL B43_NTAB32(0x1B, 0x0C0) /* Gain Control Lookup Table Core 1 */
[all …]
/openbmc/linux/drivers/media/platform/microchip/
H A Dmicrochip-isc-base.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2016-2019 Microchip Technology, Inc.
21 #include <linux/atmel-isc-media.h>
23 #include <media/v4l2-ctrls.h>
24 #include <media/v4l2-device.h>
25 #include <media/v4l2-event.h>
26 #include <media/v4l2-image-sizes.h>
27 #include <media/v4l2-ioctl.h>
28 #include <media/v4l2-fwnode.h>
29 #include <media/v4l2-subdev.h>
[all …]
/openbmc/linux/drivers/staging/media/deprecated/atmel/
H A Datmel-isc-base.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2016-2019 Microchip Technology, Inc.
21 #include <linux/atmel-isc-media.h>
23 #include <media/v4l2-ctrls.h>
24 #include <media/v4l2-device.h>
25 #include <media/v4l2-event.h>
26 #include <media/v4l2-image-sizes.h>
27 #include <media/v4l2-ioctl.h>
28 #include <media/v4l2-fwnode.h>
29 #include <media/v4l2-subdev.h>
[all …]
/openbmc/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 * ---------------------------------------------------------
47 * Datasheets specify typical temperature sensitivity and offset so that
49 * temp[Celsius] = offset[Celsius] + (raw / sensitivity)
52 * offset a constant specified by the datasheet in degree Celsius
59 * = (offset[Celsius] + (raw / sensitivity)) * 10^3
[all …]
/openbmc/linux/sound/soc/codecs/
H A Didt821034.c1 // SPDX-License-Identifier: GPL-2.0
21 u16 gain; member
28 u8 spi_tx_buf; /* Cannot use stack area for SPI (dma-safe memory) */
29 u8 spi_rx_buf; /* Cannot use stack area for SPI (dma-safe memory) */
55 .tx_buf = &idt821034->spi_tx_buf, in idt821034_8bit_write()
59 .tx_buf = &idt821034->spi_tx_buf, in idt821034_8bit_write()
64 idt821034->spi_tx_buf = val; in idt821034_8bit_write()
66 dev_vdbg(&idt821034->spi->dev, "spi xfer wr 0x%x\n", val); in idt821034_8bit_write()
68 return spi_sync_transfer(idt821034->spi, xfer, 2); in idt821034_8bit_write()
85 .tx_buf = &idt821034->spi_tx_buf, in idt821034_8bit_read()
[all …]
/openbmc/linux/include/linux/mfd/
H A Dac100.h1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * Copyright (C) 2016 Chen-Yu Tsai
7 * Chen-Yu Tsai <wens@csie.org>
84 /* ADC digital audio processing (high pass filter & auto gain control */
104 #define AC100_ADC_DAP_H_HPF_C 0x93 /* High High-Pass-Filter Coef */
105 #define AC100_ADC_DAP_L_HPF_C 0x94 /* Low High-Pass-Filter Coef */
110 #define AC100_DAC_DAP_H_HPF_C 0xa1 /* High High-Pass-Filter Coef */
111 #define AC100_DAC_DAP_L_HPF_C 0xa2 /* Low High-Pass-Filter Coef */
116 #define AC100_DAC_DAP_H_G_D_T_C 0xa7 /* High Gain Delay Time Coef */
117 #define AC100_DAC_DAP_L_G_D_T_C 0xa8 /* Low Gain Delay Time Coef */
[all …]
/openbmc/linux/drivers/media/usb/gspca/
H A Dsonixb.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (C) 2009-2011 Jean-François Moine <http://moinejf.free.fr>
14 0x10 high nibble red gain low nibble blue gain
15 0x11 low nibble green gain
17 0x05 red gain 0-127
18 0x06 blue gain 0-127
19 0x07 green gain 0-127
21 0x08-0x0f i2c / 3wire registers
24 0x15 hsize (hsize = register-value * 16)
25 0x16 vsize (vsize = register-value * 16)
[all …]
/openbmc/linux/drivers/staging/fbtft/
H A Dfb_uc1611.c1 // SPDX-License-Identifier: GPL-2.0+
5 * The display is 4-bit grayscale (16 shades) 240x160.
26 * LCD voltage is a combination of ratio, gain, pot and temp
29 * V_LCD = (C_V0 + C_PM × pot) * (1 + (T - 25) * temp)
30 * C_V0 and C_PM depend on ratio and gain
34 /* BR -> actual ratio: 0-3 -> 5, 10, 11, 13 */
37 MODULE_PARM_DESC(ratio, "BR[1:0] Bias voltage ratio: 0-3 (default: 2)");
39 static unsigned int gain = 3; variable
40 module_param(gain, uint, 0000);
41 MODULE_PARM_DESC(gain, "GN[1:0] Bias voltage gain: 0-3 (default: 3)");
[all …]
/openbmc/linux/drivers/net/wireless/broadcom/b43legacy/
H A Dphy.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
6 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
14 driver Copyright(c) 2003 - 2004 Intel Corporation.
49 /* OFDM (A) registers of a G-PHY */
51 /* Extended G-PHY registers */
55 /* Extended G-PHY Registers */
57 #define B43legacy_PHY_GTABCTL B43legacy_PHY_EXTG(0x03) /* G-PHY table control (see below) */
58 #define B43legacy_PHY_GTABOFF 0x03FF /* G-PHY table offset (see below) */
59 #define B43legacy_PHY_GTABNR 0xFC00 /* G-PHY table number (see below) */
61 #define B43legacy_PHY_GTABDATA B43legacy_PHY_EXTG(0x04) /* G-PHY table data */
[all …]
/openbmc/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
93 * voltage (uV) with hardware applied offset/slope values to adc code.
[all …]
/openbmc/linux/drivers/staging/media/atomisp/pci/isp/kernels/bnr/bnr2_2/
H A Dia_css_bnr2_2_types.h1 /* SPDX-License-Identifier: GPL-2.0 */
20 * CSS-API header file for Bayer Noise Reduction parameters.
35 /* Directional variance gain for R/G/B components in dark region */
41 /* Slope of Directional variance gain between dark and bright region */
47 /* Non-Directional variance gain for R/G/B components in dark region */
53 /* Slope of Non-Directional variance gain between dark and bright region */
61 s32 var_offset_coef; /** Variance offset coefficient */
62 s32 dir_gain; /** Gain for directional coefficient */
63 s32 detail_gain; /** Gain for low contrast texture control */
64 s32 detail_gain_divisor; /** Gain divisor for low contrast texture control */
[all …]
/openbmc/linux/drivers/net/wireless/ath/ath5k/
H A Deeprom.c2 * Copyright (c) 2004-2008 Reyk Floeter <reyk@openbsd.org>
3 * Copyright (c) 2006-2009 Nick Kossifidis <mickflemm@gmail.com>
4 * Copyright (c) 2008-2009 Felix Fietkau <nbd@openwrt.org>
49 if (ee->ee_version > AR5K_EEPROM_VERSION_3_2) in ath5k_eeprom_bin2freq()
52 val = bin > 62 ? (10 * 62) + (5 * (bin - 62)) + 5100 : in ath5k_eeprom_bin2freq()
55 if (ee->ee_version > AR5K_EEPROM_VERSION_3_2) in ath5k_eeprom_bin2freq()
75 struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; in ath5k_eeprom_init_header()
77 u32 cksum, offset, eep_max = AR5K_EEPROM_INFO_MAX; in ath5k_eeprom_init_header() local
89 if (ah->ah_ee_version < AR5K_EEPROM_VERSION_3_0) in ath5k_eeprom_init_header()
101 eep_max = (eep_max | val) - AR5K_EEPROM_INFO_BASE; in ath5k_eeprom_init_header()
[all …]
/openbmc/phosphor-hwmon/
H A Dsensor.cpp11 #include <phosphor-logging/elog-errors.hpp>
50 auto gain = env::getEnv("GAIN", sensor); in Sensor() local
51 if (!gain.empty()) in Sensor()
53 _sensorAdjusts.gain = std::stod(gain); in Sensor()
56 auto offset = env::getEnv("OFFSET", sensor); in Sensor() local
57 if (!offset.empty()) in Sensor()
59 _sensorAdjusts.offset = std::stoi(offset); in Sensor()
107 // Adjust based on gain and offset in adjustValue()
109 static_cast<double>(value) * _sensorAdjusts.gain + in adjustValue()
110 _sensorAdjusts.offset); in adjustValue()
[all …]

12345678910>>...20