/kernel/linux/linux-5.10/Documentation/devicetree/bindings/iio/adc/ |
D | ti,adc12138.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Texas Instruments ADC12138 and similar self-calibrating ADCs 10 - Akinobu Mita <akinobu.mita@gmail.com> 19 - ti,adc12130 20 - ti,adc12132 21 - ti,adc12138 34 spi-max-frequency: true 36 vref-p-supply: [all …]
|
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/iio/dac/ |
D | dpot-dac.txt | 5 divided voltage is provided by a vref regulator. 7 .------. 8 .-----------. | | 9 | vref |--' .---. 10 | regulator |--. | | 11 '-----------' | | d | 12 | | p | 14 | | t |<---------+ 16 | '---' dac output voltage 18 '------+------------+ [all …]
|
/kernel/linux/linux-5.10/drivers/iio/adc/ |
D | ti-tlc4541.c | 1 // SPDX-License-Identifier: GPL-2.0-only 91 static irqreturn_t tlc4541_trigger_handler(int irq, void *p) in tlc4541_trigger_handler() argument 93 struct iio_poll_func *pf = p; in tlc4541_trigger_handler() 94 struct iio_dev *indio_dev = pf->indio_dev; in tlc4541_trigger_handler() 98 ret = spi_sync(st->spi, &st->scan_single_msg); in tlc4541_trigger_handler() 102 iio_push_to_buffers_with_timestamp(indio_dev, st->rx_buf, in tlc4541_trigger_handler() 106 iio_trigger_notify_done(indio_dev->trig); in tlc4541_trigger_handler() 112 int vref; in tlc4541_get_range() local 114 vref = regulator_get_voltage(st->reg); in tlc4541_get_range() 115 if (vref < 0) in tlc4541_get_range() [all …]
|
D | rockchip_saradc.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 51 struct regulator *vref; member 61 writel_relaxed(0, info->regs + SARADC_CTRL); in rockchip_saradc_power_down() 67 reinit_completion(&info->completion); in rockchip_saradc_conversion() 70 writel_relaxed(8, info->regs + SARADC_DLY_PU_SOC); in rockchip_saradc_conversion() 72 info->last_chan = chan; in rockchip_saradc_conversion() 76 | (chan->channel & SARADC_CTRL_CHN_MASK) in rockchip_saradc_conversion() 78 info->regs + SARADC_CTRL); in rockchip_saradc_conversion() 80 if (!wait_for_completion_timeout(&info->completion, SARADC_TIMEOUT)) in rockchip_saradc_conversion() 81 return -ETIMEDOUT; in rockchip_saradc_conversion() [all …]
|
D | ad7923.c | 1 // SPDX-License-Identifier: GPL-2.0-only 46 #define EXTRACT(val, dec, bits) (((val) >> (dec)) & ((1 << (bits)) - 1)) 170 for_each_set_bit(i, active_scan_mask, indio_dev->num_channels - 1) { in ad7923_update_scan_mode() 173 st->settings; in ad7923_update_scan_mode() 175 st->tx_buf[len++] = cpu_to_be16(cmd); in ad7923_update_scan_mode() 178 st->ring_xfer[0].tx_buf = &st->tx_buf[0]; in ad7923_update_scan_mode() 179 st->ring_xfer[0].len = len; in ad7923_update_scan_mode() 180 st->ring_xfer[0].cs_change = 1; in ad7923_update_scan_mode() 182 spi_message_init(&st->ring_msg); in ad7923_update_scan_mode() 183 spi_message_add_tail(&st->ring_xfer[0], &st->ring_msg); in ad7923_update_scan_mode() [all …]
|
D | ad7298.c | 1 // SPDX-License-Identifier: GPL-2.0-only 30 #define AD7298_CH(x) BIT(13 - (x)) /* channel select */ 83 .scan_index = -1, 113 scan_count = bitmap_weight(active_scan_mask, indio_dev->masklength); in ad7298_update_scan_mode() 115 command = AD7298_WRITE | st->ext_ref; in ad7298_update_scan_mode() 121 st->tx_buf[0] = cpu_to_be16(command); in ad7298_update_scan_mode() 124 st->ring_xfer[0].tx_buf = &st->tx_buf[0]; in ad7298_update_scan_mode() 125 st->ring_xfer[0].len = 2; in ad7298_update_scan_mode() 126 st->ring_xfer[0].cs_change = 1; in ad7298_update_scan_mode() 127 st->ring_xfer[1].tx_buf = &st->tx_buf[1]; in ad7298_update_scan_mode() [all …]
|
D | ti-ads8688.c | 1 // SPDX-License-Identifier: GPL-2.0-only 44 * enum ads8688_range - ADS8688 reference voltage range 45 * @ADS8688_PLUSMINUS25VREF: Device is configured for input range ±2.5 * VREF 46 * @ADS8688_PLUSMINUS125VREF: Device is configured for input range ±1.25 * VREF 47 * @ADS8688_PLUSMINUS0625VREF: Device is configured for input range ±0.625 * VREF 48 * @ADS8688_PLUS25VREF: Device is configured for input range 0 - 2.5 * VREF 49 * @ADS8688_PLUS125VREF: Device is configured for input range 0 - 1.25 * VREF 93 .offset = -(1 << (ADS8688_REALBITS - 1)), 98 .offset = -(1 << (ADS8688_REALBITS - 1)), 103 .offset = -(1 << (ADS8688_REALBITS - 1)), [all …]
|
D | ti-ads7950.c | 1 // SPDX-License-Identifier: GPL-2.0 12 * Copyright (C) 2013 Texas Instruments Incorporated - https://www.ti.com/ 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 96 * [4-6] Different GPIO alarm mode configurations [all …]
|
D | ad7768-1.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Analog Devices AD7768-1 SPI ADC driver 156 struct regulator *vref; member 184 shift = 32 - (8 * len); in ad7768_spi_reg_read() 185 st->data.d8[0] = AD7768_RD_FLAG_MSK(addr); in ad7768_spi_reg_read() 187 ret = spi_write_then_read(st->spi, st->data.d8, 1, in ad7768_spi_reg_read() 188 &st->data.d32, len); in ad7768_spi_reg_read() 192 return (be32_to_cpu(st->data.d32) >> shift); in ad7768_spi_reg_read() 199 st->data.d8[0] = AD7768_WR_FLAG_MSK(addr); in ad7768_spi_reg_write() 200 st->data.d8[1] = val & 0xFF; in ad7768_spi_reg_write() [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 | ad799x.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (C) 2010-2011 Michael Hennerich, Analog Devices Inc. 7 * Copyright (C) 2008-2010 Jonathan Cameron 10 * Copyright (C) 2002-2004 Stefan Eletzhofer 100 * struct ad799x_chip_config - chip specific information 112 * struct ad799x_chip_info - chip specific information 127 struct regulator *vref; member 137 switch (st->id) { in ad799x_write_config() 140 return i2c_smbus_write_word_swapped(st->client, AD7998_CONF_REG, in ad799x_write_config() 145 return i2c_smbus_write_byte_data(st->client, AD7998_CONF_REG, in ad799x_write_config() [all …]
|
D | ad7766.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 67 static irqreturn_t ad7766_trigger_handler(int irq, void *p) in ad7766_trigger_handler() argument 69 struct iio_poll_func *pf = p; in ad7766_trigger_handler() 70 struct iio_dev *indio_dev = pf->indio_dev; in ad7766_trigger_handler() 74 ret = spi_sync(ad7766->spi, &ad7766->msg); in ad7766_trigger_handler() 78 iio_push_to_buffers_with_timestamp(indio_dev, ad7766->data, in ad7766_trigger_handler() 79 pf->timestamp); in ad7766_trigger_handler() 81 iio_trigger_notify_done(indio_dev->trig); in ad7766_trigger_handler() 91 ret = regulator_bulk_enable(ARRAY_SIZE(ad7766->reg), ad7766->reg); in ad7766_preenable() 93 dev_err(&ad7766->spi->dev, "Failed to enable supplies: %d\n", in ad7766_preenable() [all …]
|
D | max1118.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * MAX1117/MAX1118/MAX1119 8-bit, dual-channel ADCs driver 7 * Datasheet: https://datasheets.maximintegrated.com/en/ds/MAX1117-MAX1119.pdf 13 * ------ --------- ----------- 14 * nCS --> CNVST 15 * SCK --> SCLK 16 * MISO <-- DOUT 17 * ------ --------- ----------- 99 .rx_buf = &adc->data, in max1118_read() 113 return adc->data; in max1118_read() [all …]
|
D | max1363.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (C) 2008-2010 Jonathan Cameron 7 * Copyright (C) 2002-2004 Stefan Eletzhofer 52 /* think about including max11600 etc - more settings */ 59 /* max1363 only - though don't care on others. 80 /* max123{6-9} only */ 83 /* max1363 only - merely part of channel selects or don't care for others */ 88 /* max1363 strictly 0x06 - but doesn't matter */ 95 * struct max1363_mode - scan mode information 123 * struct max1363_chip_info - chip specifc information [all …]
|
D | ti-adc12138.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * ADC12130/ADC12132/ADC12138 12-bit plus sign ADC driver 131 .tx_buf = adc->tx_buf, in adc12138_mode_programming() 132 .rx_buf = adc->rx_buf, in adc12138_mode_programming() 138 if (adc->id != adc12138) in adc12138_mode_programming() 141 adc->tx_buf[0] = mode; in adc12138_mode_programming() 143 ret = spi_sync_transfer(adc->spi, &xfer, 1); in adc12138_mode_programming() 147 memcpy(rx_buf, adc->rx_buf, len); in adc12138_mode_programming() 171 u8 mode = (ch_to_mux[channel->channel] << 4) | in __adc12138_start_conv() 172 (channel->differential ? 0 : 0x80); in __adc12138_start_conv() [all …]
|
D | at91-sama5d2_adc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 12 #include <linux/dma-mapping.h> 98 /* Interrupt Enable Register - TS X measurement ready */ 100 /* Interrupt Enable Register - TS Y measurement ready */ 102 /* Interrupt Enable Register - TS pressure measurement ready */ 104 /* Interrupt Enable Register - Data ready */ 106 /* Interrupt Enable Register - general overrun error */ 108 /* Interrupt Enable Register - Pen detect */ 110 /* Interrupt Enable Register - No pen detect */ 118 /* Interrupt Status Register - Pen touching sense status */ [all …]
|
D | ti-adc081c.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * TI ADC081C/ADC101C/ADC121C 8/10/12-bit ADC driver 14 * bits handled. For the 8-bit and 10-bit models the least-significant 4 or 2 55 err = i2c_smbus_read_word_swapped(adc->i2c, REG_CONV_RES); in adc081c_read_raw() 59 *value = (err & 0xFFF) >> (12 - adc->bits); in adc081c_read_raw() 63 err = regulator_get_voltage(adc->ref); in adc081c_read_raw() 68 *shift = adc->bits; in adc081c_read_raw() 76 return -EINVAL; in adc081c_read_raw() 87 .shift = 12 - (_bits), \ 132 static irqreturn_t adc081c_trigger_handler(int irq, void *p) in adc081c_trigger_handler() argument [all …]
|
D | ti-adc084s021.c | 1 // SPDX-License-Identifier: GPL-2.0-only 39 __be16 rx_buf[5]; /* First 16-bits are trash */ 75 int n_words = (adc->spi_trans.len >> 1) - 1; /* Discard first word */ in adc084s021_adc_conversion() 77 u16 *p = data; in adc084s021_adc_conversion() local 80 ret = spi_sync(adc->spi, &adc->message); in adc084s021_adc_conversion() 85 *(p + i) = adc->rx_buf[i + 1]; in adc084s021_adc_conversion() 103 ret = regulator_enable(adc->reg); in adc084s021_read_raw() 109 adc->tx_buf[0] = channel->channel << 3; in adc084s021_read_raw() 112 regulator_disable(adc->reg); in adc084s021_read_raw() 117 *val = (*val >> channel->scan_type.shift) & 0xff; in adc084s021_read_raw() [all …]
|
/kernel/linux/linux-5.10/drivers/iio/dac/ |
D | dpot-dac.c | 1 // SPDX-License-Identifier: GPL-2.0 13 * divided voltage is provided by a vref regulator. 15 * .------. 16 * .-----------. | | 17 * | vref |--' .---. 18 * | regulator |--. | | 19 * '-----------' | | d | 20 * | | p | 22 * | | t |<---------+ 24 * | '---' dac output voltage [all …]
|
/kernel/linux/linux-5.10/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 42 * Support for ads7843 tested on Atmel at91sam926x-EK. 56 * note. The strength of filtering can be set in the board-* specific 70 * with msbs zeroed). Instead, we read them as two 8-bit values, 83 * driver is used with DMA-based SPI controllers (like atmel_spi) on 84 * systems where main memory is not DMA-coherent (most non-x86 boards). 90 /* for ads7845 with mpc5121 psc spi we use 3-byte buffers */ [all …]
|
/kernel/linux/linux-5.10/drivers/hwmon/ |
D | smm665.c | 1 // SPDX-License-Identifier: GPL-2.0-only 22 #include <linux/hwmon-sysfs.h> 26 /* Internal reference voltage (VREF, x 1000 */ 30 static int vref = SMM665_VREF_ADC_X1000; variable 31 module_param(vref, int, 0); 32 MODULE_PARM_DESC(vref, "Reference voltage in mV"); 111 * vref = Reference voltage on VREF_ADC pin (module parameter) 115 /* Voltage A-F and VDD */ 116 #define SMM665_VMON_ADC_TO_VOLTS(adc) ((adc) * vref / 256) 119 #define SMM665_12VIN_ADC_TO_VOLTS(adc) ((adc) * vref * 3 / 256) [all …]
|
/kernel/linux/linux-5.10/sound/soc/codecs/ |
D | rt298.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt298.c -- RT298 ALSA SoC audio codec driver 23 #include <sound/soc-dapm.h> 200 snd_soc_component_write(component, rt298->index_cache[i].reg, in rt298_index_sync() 201 rt298->index_cache[i].def); in rt298_index_sync() 227 if (!rt298->component) in rt298_jack_detect() 228 return -EINVAL; in rt298_jack_detect() 230 dapm = snd_soc_component_get_dapm(rt298->component); in rt298_jack_detect() 232 if (rt298->pdata.cbj_en) { in rt298_jack_detect() 233 regmap_read(rt298->regmap, RT298_GET_HP_SENSE, &buf); in rt298_jack_detect() [all …]
|
/kernel/linux/linux-5.10/sound/pci/hda/ |
D | hda_codec.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 27 #define codec_in_pm(codec) snd_hdac_is_in_pm(&codec->core) 28 #define hda_codec_is_power_on(codec) snd_hdac_is_power_on(&codec->core) 30 ((codec)->core.power_caps & AC_PWRST_EPSS) 32 ((codec)->core.power_caps & AC_PWRST_CLKSTOP) 35 * Send and receive a verb - passed to exec_verb override for hdac_device 41 struct hda_bus *bus = codec->bus; in codec_exec_verb() 45 return -1; in codec_exec_verb() 49 mutex_lock(&bus->core.cmd_mutex); in codec_exec_verb() 51 bus->no_response_fallback = 1; in codec_exec_verb() [all …]
|
/kernel/linux/linux-5.10/drivers/media/i2c/ |
D | tda1997x_regs.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 6 /* Page 0x00 - General Control */ 149 #define SVC_MODE_PAL BIT(2) /* 0=NTSC(480i/p) 1=PAL(576i/p) */ 162 #define RT_MAN_CTRL_RT_B BIT(1) /* enable TMDS pull-up on Input B */ 163 #define RT_MAN_CTRL_RT_A BIT(0) /* enable TMDS pull-up on Input A */ 209 #define PCLK_DELAY_SHIFT 4 /* Pixel delay (-8..+7) */ 224 /* Page 0x01 - HDMI info and packets */ 244 /* Page 0x12 - HDMI Extra control and debug */ 276 /* Page 0x13 - HDMI Extra control and debug */ 348 /* Page 0x14 - Audio Extra control and debug */ [all …]
|
D | vpx3220.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 16 #include <media/v4l2-device.h> 17 #include <media/v4l2-ctrls.h> 25 MODULE_PARM_DESC(debug, "Debug level (0-1)"); 30 /* ----------------------------------------------------------------------- */ 49 return &container_of(ctrl->handler, struct vpx3220, hdl)->sd; in to_sd() 54 /* ----------------------------------------------------------------------- */ 61 decoder->reg[reg] = value; in vpx3220_write() 89 return -1; in vpx3220_fp_status() 96 /* Write the 16-bit address to the FPWR register */ in vpx3220_fp_write() [all …]
|