Home
last modified time | relevance | path

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

12345678910>>...17

/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 …]
/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 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 …]
/linux/sound/soc/codecs/
H A Dpcm6240.c1 // SPDX-License-Identifier: GPL-2.0
5 // Copyright (C) 2022 - 2024 Texas Instruments Incorporated
12 // Author: Shenghao Ding <shenghao-ding@ti.com>
500 -10000, 2700);
502 -12750, 0);
504 -25500, 0);
506 -11450, 2000);
508 -1005
1477 int offset = 0, ret = 0, i; pcmdev_regbin_ready() local
1695 int offset = 2; pcmdev_single_byte_wr() local
1724 int offset = 2; pcmdev_burst_wr() local
1755 int offset = 2; pcmdev_delay() local
1772 int offset = 2; pcmdev_bits_wr() local
[all...]
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 …]
/linux/drivers/iio/dac/
H A Dad3552r-common.c1 // SPDX-License-Identifier: GPL-2.0+
3 // Copyright (c) 2010-2024 Analog Devices Inc.
18 [AD3552R_CH_OUTPUT_RANGE_NEG_5__5V] = { -5000, 5000 },
19 [AD3552R_CH_OUTPUT_RANGE_NEG_10__10V] = { -10000, 10000 }
27 [AD3542R_CH_OUTPUT_RANGE_NEG_5__5V] = { -5000, 5000 },
28 [AD3542R_CH_OUTPUT_RANGE_NEG_2P5__7P5V] = { -2500, 7500 }
32 /* Gain * AD3552R_GAIN_SCALE */
53 s64 vref, tmp, common, offset, gn, gp; in ad3552r_get_custom_range() local
56 * Vmin = 2.5 + [(GainN + Offset / 1024) * 2.5 * Rfb * 1.03] in ad3552r_get_custom_range()
57 * Vmax = 2.5 - [(GainP + Offset / 1024) * 2.5 * Rfb * 1.03] in ad3552r_get_custom_range()
[all …]
/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 …]
/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 …]
H A Dadv_pci1724.c1 // SPDX-License-Identifier: GPL-2.0+
4 * Comedi driver for the Advantech PCI-1724U card.
9 * COMEDI - Linux Control and Measurement Device Interface
10 * Copyright (C) 1997-8 David A. Schleef <ds@schleef.org>
15 * Description: Advantech PCI-1724U
16 * Devices: [Advantech] PCI-1724U (adv_pci1724)
18 * Updated: 2013-02-09
24 * Subdevice 1 is the offset calibration for the analog output.
25 * Subdevice 2 is the gain calibration for the analog output.
27 * The calibration offset and gains have quite a large effect on the
[all …]
/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 …]
/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_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 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 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 …]
/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 …]
/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 …]
/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 …]
/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 …]
/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 …]
/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 …]
/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 …]
/linux/drivers/bcma/
H A Dsprom.c5 * Copyright 2011, 2012, Hauke Mehrtens <hauke@hauke-m.de>
16 #include <linux/dma-mapping.h>
22 * bcma_arch_register_fallback_sprom - Registers a method providing a
33 * This function is useful for weird architectures that have a half-assed
43 return -EEXIST; in bcma_arch_register_fallback_sprom()
55 err = -ENOENT; in bcma_fill_sprom_with_fallback()
64 bus->sprom.revision); in bcma_fill_sprom_with_fallback()
75 static void bcma_sprom_read(struct bcma_bus *bus, u16 offset, u16 *sprom, in bcma_sprom_read() argument
80 sprom[i] = bcma_read16(bus->drv_cc.core, offset + (i * 2)); in bcma_sprom_read()
132 for (word = 0; word < words - 1; word++) { in bcma_sprom_crc()
[all …]
/linux/drivers/iio/amplifiers/
H A Dada4250.c1 // SPDX-License-Identifier: GPL-2.0-only
63 u8 gain; member
71 /* ADA4250 Gain (V/V) values: 1, 2, 4, 8, 16, 32, 64, 128 */
91 if (st->bias == 0 || st->bias == 3) in ada4250_set_offset_uv()
92 return -EINVAL; in ada4250_set_offset_uv()
94 voltage_v = regulator_get_voltage(st->reg); in ada4250_set_offset_uv()
97 if (st->bias == ADA4250_BIAS_AVDD) in ada4250_set_offset_uv()
102 x[1] = 126 * (x[0] - 1); in ada4250_set_offset_uv()
107 if (st->gain == 0) in ada4250_set_offset_uv()
108 return -EINVAL; in ada4250_set_offset_uv()
[all …]
/linux/drivers/media/dvb-frontends/
H A Dts2020.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 Montage Technology TS2020 - Silicon Tuner driver
4 Copyright (C) 2009-2012 Konstantin Dimitrov <kosio.dimitrov@gmail.com>
6 Copyright (C) 2009-2012 TurboSight.com
49 struct ts2020_priv *priv = fe->tuner_priv; in ts2020_release()
50 struct i2c_client *client = priv->client; in ts2020_release()
52 dev_dbg(&client->dev, "\n"); in ts2020_release()
59 struct ts2020_priv *priv = fe->tuner_priv; in ts2020_sleep()
63 if (priv->tuner == TS2020_M88TS2020) in ts2020_sleep()
68 ret = regmap_write(priv->regmap, u8tmp, 0x00); in ts2020_sleep()
[all …]
/linux/drivers/media/i2c/
H A Dov9650.c1 // SPDX-License-Identifier: GPL-2.0-only
24 #include <media/media-entity.h>
25 #include <media/v4l2-async.h>
26 #include <media/v4l2-ctrls.h>
27 #include <media/v4l2-device.h>
28 #include <media/v4l2-event.h>
29 #include <media/v4l2-image-sizes.h>
30 #include <media/v4l2-subdev.h>
31 #include <media/v4l2-mediabus.h>
35 MODULE_PARM_DESC(debug, "Debug level (0-2)");
[all …]

12345678910>>...17