/linux-6.12.1/Documentation/devicetree/bindings/iio/adc/ |
D | adi,ad4000.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Marcelo Schmitt <marcelo.schmitt@analog.com> 15 https://www.analog.com/media/en/technical-documentation/data-sheets/ad4000-4004-4008.pdf 16 https://www.analog.com/media/en/technical-documentation/data-sheets/ad4001-4005.pdf 17 https://www.analog.com/media/en/technical-documentation/data-sheets/ad4002-4006-4010.pdf 18 https://www.analog.com/media/en/technical-documentation/data-sheets/ad4003-4007-4011.pdf 19 https://www.analog.com/media/en/technical-documentation/data-sheets/ad4020-4021-4022.pdf 20 https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4001.pdf [all …]
|
/linux-6.12.1/include/linux/iio/adc/ |
D | qcom-vadc-common.h | 1 /* 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-6.12.1/drivers/iio/adc/ |
D | ad4000.c | 1 // SPDX-License-Identifier: GPL-2.0+ 56 .shift = _storage_bits - _real_bits, \ 78 .shift = _storage_bits - _real_bits, \ 98 /* maps adi,sdi-pin property value to enum */ 254 if (chan->scan_type.sign == 's') in ad4000_fill_scale_tbl() 255 scale_bits = chan->scan_type.realbits - 1; in ad4000_fill_scale_tbl() 257 scale_bits = chan->scan_type.realbits; in ad4000_fill_scale_tbl() 260 * The gain is stored as a fraction of 1000 and, as we need to in ad4000_fill_scale_tbl() 261 * divide vref_mv by the gain, we invert the gain/1000 fraction. in ad4000_fill_scale_tbl() 262 * Also multiply by an extra MILLI to preserve precision. in ad4000_fill_scale_tbl() [all …]
|
D | ti-ads1100.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * ADS1100 - Texas Instruments Analog-to-Digital Converter 8 * IIO driver for ADS1100 and ADS1000 ADC 16-bit I2C 34 /* Gain */ 49 int scale_avail[2 * 4]; /* 4 gain settings */ 73 u8 config = (data->config & ~mask) | (value & mask); in ads1100_set_config_bits() 75 if (data->config == config) in ads1100_set_config_bits() 78 ret = i2c_master_send(data->client, &config, 1); in ads1100_set_config_bits() 82 data->config = config; in ads1100_set_config_bits() 89 return ads1100_data_rate_bits[FIELD_GET(ADS1100_DR_MASK, data->config)]; in ads1100_data_bits() [all …]
|
D | max9611.c | 1 // 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) 73 * (((adc_read >> 4) * 1000) - offset) / (1 / 14 * 1000) 79 * max9611 temperature reading: LSB is 480 milli degrees Celsius 115 * max9611_mux_conf - associate ADC mux configuration with register address [all …]
|
D | ad7192.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright 2011-2015 Analog Devices Inc. 11 #include <linux/clk-provider.h> 35 #define AD7192_REG_COMM 0 /* Communications Register (WO, 8-bit) */ 36 #define AD7192_REG_STAT 0 /* Status Register (RO, 8-bit) */ 37 #define AD7192_REG_MODE 1 /* Mode Register (RW, 24-bit */ 38 #define AD7192_REG_CONF 2 /* Configuration Register (RW, 24-bit) */ 39 #define AD7192_REG_DATA 3 /* Data Register (RO, 24/32-bit) */ 40 #define AD7192_REG_ID 4 /* ID Register (RO, 8-bit) */ 41 #define AD7192_REG_GPOCON 5 /* GPOCON Register (RO, 8-bit) */ [all …]
|
D | ti-ads1298.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2023 - 2024 Topic Embedded Products 94 /* For reading and writing registers, we need a 3-byte buffer */ 96 /* Outputs status word and 'n' 24-bit samples, plus the command byte */ 119 * >2 = Multiple DRDY during transfer, lost rdata_xfer_busy - 2 samples 173 .tx_buf = priv->cmd_buffer, in ads1298_write_cmd() 174 .rx_buf = priv->cmd_buffer, in ads1298_write_cmd() 183 priv->cmd_buffer[0] = command; in ads1298_write_cmd() 185 return spi_sync_transfer(priv->spi, &xfer, 1); in ads1298_write_cmd() 193 ret = regmap_update_bits(priv->regmap, ADS1298_REG_CHnSET(chan_index), in ads1298_read_one() [all …]
|
D | mcp3564.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 * Copyright (C) 2022-2023 Microchip Technology Inc. and its subsidiaries 10 …s/aemDocuments/documents/MSLD/ProductDocuments/DataSheets/MCP3561-2-4-Family-Data-Sheet-DS20006181… 12 …ds/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP3561_2_4R-Data-Sheet-DS200006391C.pdf 14 …ProductDocuments/DataSheets/MCP3461-2-4-Two-Four-Eight-Channel-153.6-ksps-Low-Noise-16-Bit-Delta-S… 16 …/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP3461-2-4R-Family-Data-Sheet-DS20006404… 64 * ADC Output Data Format 32-bit (25-bit right justified data + Channel ID): 65 * CHID[3:0] + SGN extension (4 bits) + 24-bit ADC data. 70 * ADC Output Data Format 32-bit (25-bit right justified data): 71 * SGN extension (8-bit) + 24-bit ADC data. [all …]
|
D | at91-sama5d2_adc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 #include <linux/dma-mapping.h> 31 #include <linux/nvmem-consumer.h> 36 #include <dt-bindings/iio/adc/at91-sama5d2_adc.h> 110 /* Interrupt Enable Register - TS X measurement ready */ 112 /* Interrupt Enable Register - TS Y measurement ready */ 114 /* Interrupt Enable Register - TS pressure measurement ready */ 116 /* Interrupt Enable Register - Data ready */ 118 /* Interrupt Enable Register - general overrun error */ 120 /* Interrupt Enable Register - Pen detect */ [all …]
|
/linux-6.12.1/drivers/hwmon/ |
D | tmp513.c | 1 // 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=4, 4=3, 2=2, 1=1 188 return 5 - ffs(data->pga_gain); in tmp51x_get_pga_shift() 205 * on the pga gain setting. 1lsb = 10uV in tmp51x_get_value() 207 *val = sign_extend32(regval, 17 - tmp51x_get_pga_shift(data)); in tmp51x_get_value() 208 *val = DIV_ROUND_CLOSEST(*val * 10 * MILLI, data->shunt_uohms); in tmp51x_get_value() [all …]
|
/linux-6.12.1/drivers/iio/pressure/ |
D | st_pressure_core.c | 1 // 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-6.12.1/drivers/hwmon/pmbus/ |
D | mp2856.c | 1 // 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 …]
|
D | mp2975.c | 1 // 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 …]
|
/linux-6.12.1/drivers/iio/light/ |
D | rohm-bu27034.c | 1 // SPDX-License-Identifier: GPL-2.0-only 20 #include <linux/iio/iio-gts-helper.h> 52 * inevitable even if the sensor clock would be perfectly phase-locked to CPU 53 * clock - which we can't say is the case. 56 * risk of losing a sample because things can in a rainy-day scenario be 69 * Downside is that the time-stamps would be very inaccurate as the wake-up 71 * result 'jumps' in the time-stamps when the delay drifted so that wake-up was 72 * performed during the consecutive wake-ups (Or, when sensor and CPU clocks 73 * were very different and scheduling the wake-ups was very close to given 74 * timeout - and when the time-outs were very close to the actual sensor [all …]
|
/linux-6.12.1/drivers/power/supply/ |
D | ds2780_battery.c | 1 // 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 …]
|
D | ds2781_battery.c | 1 // 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-6.12.1/drivers/iio/proximity/ |
D | isl29501.c | 1 // 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-6.12.1/sound/soc/codecs/ |
D | rt5640.c | 1 // 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 …]
|
D | rt5651.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5651.c -- RT5651 ALSA SoC audio codec driver 23 #include <sound/soc-dapm.h> 287 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0); 288 static const DECLARE_TLV_DB_MINMAX(dac_vol_tlv, -6562, 0); 289 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0); 290 static const DECLARE_TLV_DB_MINMAX(adc_vol_tlv, -1762, 3000); 352 SOC_DOUBLE_TLV("ADC Boost Gain", RT5651_ADC_BST_VOL, 369 * set_dmic_clk - Set parameter of dmic. 379 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in set_dmic_clk() [all …]
|
D | wcd934x.c | 1 // 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-mbhc-v2.h" 430 COMPANDER_5, /* LO3_SE - not used in Tavil */ 431 COMPANDER_6, /* LO4_SE - not used in Tavil */ 515 .name = "WCD9335-IFC-DEV", 581 static const DECLARE_TLV_DB_SCALE(digital_gain, -8400, 100, -8400); 597 "Class H Invalid", "Class-H Hi-Fi", "Class-H Low Power", "Class-AB", [all …]
|
/linux-6.12.1/Documentation/ABI/testing/ |
D | sysfs-bus-iio | 3 Contact: linux-iio@vger.kernel.org 11 Contact: linux-iio@vger.kernel.org 25 Contact: linux-iio@vger.kernel.org 31 Contact: linux-iio@vger.kernel.org 38 Contact: linux-iio@vger.kernel.org 44 The contents of the label are free-form, but there are some 51 * "proximity-wifi" 52 * "proximity-lte" 53 * "proximity-wifi-lte" 54 * "proximity-wifi-left" [all …]
|
/linux-6.12.1/sound/pci/asihpi/ |
D | hpi_internal.h | 1 /* 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-6.12.1/drivers/gpu/drm/amd/display/dmub/inc/ |
D | dmub_cmd.h | 143 * Physical framebuffer address location, 64-bit. 192 * to be disabled immediately and keep gain. 250 * @knee_threshold: Current x-position of ACE knee (u0.16). 270 * union dmub_addr - DMUB physical/virtual 64-bit address. 519 * union dmub_fw_meta_feature_bits - Static feature bits for pre-initialization 526 uint32_t all; /**< 32-bit access to status bits */ 530 * struct dmub_fw_meta_info - metadata associated with fw binary 558 * union dmub_fw_meta - ensures that dmub_fw_meta_info remains 64 bytes 572 * dmub_trace_code_t - firmware trace code, 32-bits 577 * struct dmcub_trace_buf_entry - Firmware trace entry [all …]
|
/linux-6.12.1/drivers/net/ethernet/intel/e1000e/ |
D | phy.c | 1 // 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-6.12.1/Documentation/scsi/ |
D | ncr53c8xx.rst | 1 .. 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 …]
|