/openbmc/u-boot/doc/device-tree-bindings/adc/ |
H A D | st,stm32-adc.txt | 1 STMicroelectronics STM32 ADC device 3 STM32 ADC is a successive approximation analog-to-digital converter. 4 It has several multiplexed input channels. Conversions can be performed 5 in single, continuous, scan or discontinuous mode. Result of the ADC is 6 stored in a left-aligned or right-aligned 32-bit data register. 10 voltage goes beyond the user-defined, higher or lower thresholds. 12 Each STM32 ADC block can have up to 3 ADC instances. 16 - regular conversion can be done in sequence, running in background 17 - injected conversions have higher priority, and so have the ability to 21 Contents of a stm32 adc root node: [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/iio/adc/ |
H A D | st,stm32-adc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/iio/adc/st,stm32-adc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: STMicroelectronics STM32 ADC 10 STM32 ADC is a successive approximation analog-to-digital converter. 11 It has several multiplexed input channels. Conversions can be performed 12 in single, continuous, scan or discontinuous mode. Result of the ADC is 13 stored in a left-aligned or right-aligned 32-bit data register. 17 voltage goes beyond the user-defined, higher or lower thresholds. [all …]
|
H A D | st,stm32-dfsdm-adc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/iio/adc/st,stm32-dfsdm-adc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: STMicroelectronics STM32 DFSDM ADC device driver 10 - Fabrice Gasnier <fabrice.gasnier@foss.st.com> 11 - Olivier Moysan <olivier.moysan@foss.st.com> 14 STM32 DFSDM ADC is a sigma delta analog-to-digital converter dedicated to 17 - Sigma delta modulators (motor control, metering...) 18 - PDM microphones (audio digital microphone) [all …]
|
H A D | ti,am3359-adc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/iio/adc/ti,am3359-adc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: TI AM3359 ADC 10 - Miquel Raynal <miquel.raynal@bootlin.com> 15 - enum: 16 - ti,am3359-adc 17 - ti,am4372-adc 18 - items: [all …]
|
H A D | cosmic,10001-adc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/iio/adc/cosmic,10001-adc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Cosmic Circuits CC-10001 ADC 10 - Jonathan Cameron <jic23@kernel.org> 13 Cosmic Circuits 10001 10-bit ADC device. 17 const: cosmic,10001-adc 22 adc-reserved-channels: 25 Bitmask of reserved channels, i.e. channels that cannot be [all …]
|
H A D | atmel,sama9260-adc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/iio/adc/atmel,sama9260-adc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: AT91 sama9260 and similar Analog to Digital Converter (ADC) 10 - Alexandre Belloni <alexandre.belloni@bootlin.com> 15 - atmel,at91sam9260-adc 16 - atmel,at91sam9rl-adc 17 - atmel,at91sam9g45-adc 18 - atmel,at91sam9x5-adc [all …]
|
H A D | adi,ad7124.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 4 --- 5 $id: http://devicetree.org/schemas/iio/adc/adi,ad7124.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: Analog Devices AD7124 ADC device driver 11 - Stefan Popa <stefan.popa@analog.com> 14 Bindings for the Analog Devices AD7124 ADC device. Datasheet can be 16 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7124-8.pdf 21 - adi,ad7124-4 22 - adi,ad7124-8 [all …]
|
H A D | aspeed,ast2600-adc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/iio/adc/aspeed,ast2600-adc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: ADC that forms part of an ASPEED server management processor. 10 - Billy Tsai <billy_tsai@aspeedtech.com> 13 • 10-bits resolution for 16 voltage channels. 15 channels. 16 • Channel scanning can be non-continuous. 17 • Programmable ADC clock frequency. [all …]
|
/openbmc/u-boot/include/ |
H A D | adc.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 10 /* ADC_CHANNEL() - ADC channel bit mask, to select only required channels */ 13 /* The last possible selected channel with 32-bit mask */ 17 * adc_data_format: define the ADC output data format, can be useful when 19 * - ADC_DATA_FORMAT_BIN - binary offset 20 * - ADC_DATA_FORMAT_2S - two's complement 31 * struct adc_channel - structure to hold channel conversion data. 32 * Useful to keep the result of a multi-channel conversion output. 34 * @id - channel id 35 * @data - channel conversion data [all …]
|
/openbmc/u-boot/drivers/adc/ |
H A D | Kconfig | 1 config ADC config 2 bool "Enable ADC drivers using Driver Model" 4 This enables ADC API for drivers, which allows driving ADC features 5 by single and multi-channel methods for: 6 - start/stop/get data for conversion of a single-channel selected by 7 a number or multi-channels selected by a bitmask 8 - get data mask (ADC resolution) 9 ADC reference Voltage supply options: 10 - methods for get Vdd/Vss reference Voltage values with polarity 11 - support supply's phandle with auto-enable [all …]
|
H A D | stm32-adc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2018, STMicroelectronics - All Rights Reserved 6 * Originally based on the Linux kernel v4.18 drivers/iio/adc/stm32-adc.c. 10 #include <adc.h> 13 #include "stm32-adc-core.h" 15 /* STM32H7 - Registers for each ADC instance */ 26 /* STM32H7_ADC_ISR - bit fields */ 31 /* STM32H7_ADC_CR - bit fields */ 43 /* STM32H7_ADC_SQR1 - bit fields */ 46 /* BOOST bit must be set on STM32H7 when ADC clock is above 20MHz */ [all …]
|
/openbmc/linux/drivers/iio/adc/ |
H A D | mcp320x.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 * Driver for following ADC chips from Microchip Technology's: 14 * ------------ 20 * ------------ 23 * ------------ 65 const struct iio_chan_spec *channels; member 72 * struct mcp320x - Microchip SPI ADC instance 74 * @msg: SPI message to select a channel and receive a value from the ADC 80 * @chip_info: ADC properties 81 * @tx_buf: buffer for @transfer[0] (not used on single-channel converters) [all …]
|
H A D | stm32-adc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * This file is part of STM32 ADC driver 5 * Copyright (C) 2016, STMicroelectronics - All Rights Reserved 12 #include <linux/dma-mapping.h> 16 #include <linux/iio/timer/stm32-lptim-trigger.h> 17 #include <linux/iio/timer/stm32-timer-trigger.h> 26 #include <linux/nvmem-consumer.h> 31 #include "stm32-adc-core.h" 36 /* BOOST bit must be set on STM32H7 when ADC clock is above 20MHz */ 39 #define STM32_ADC_CH_MAX 20 /* max number of channels */ [all …]
|
H A D | qcom-pm8xxx-xoadc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 * specific-purpose and general purpose ADC converters and channels. 13 #include <linux/iio/adc/qcom-vadc-common.h> 27 * Qualcomm tree. Their kernel has two out-of-tree drivers for the ADC: 28 * drivers/misc/pmic8058-xoadc.c 29 * drivers/hwmon/pm8xxx-adc.c 57 /* Proper ADC registers */ 99 * On a later ADC the decimation factors are defined as 123 * Physical channels which MUST exist on all PM variants in order to provide 155 * struct xoadc_channel - encodes channel properties and defaults [all …]
|
H A D | ti-adc084s021.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Driver for Texas Instruments' ADC084S021 ADC chip. 31 __be16 channels[4]; member 39 __be16 rx_buf[5]; /* First 16-bits are trash */ 68 * adc084s021_adc_conversion() - Read an ADC channel and return its value. 70 * @adc: The ADC SPI data. 73 static int adc084s021_adc_conversion(struct adc084s021 *adc, __be16 *data) in adc084s021_adc_conversion() argument 75 int n_words = (adc->spi_trans.len >> 1) - 1; /* Discard first word */ in adc084s021_adc_conversion() 79 ret = spi_sync(adc->spi, &adc->message); in adc084s021_adc_conversion() 84 *(data + i) = adc->rx_buf[i + 1]; in adc084s021_adc_conversion() [all …]
|
H A D | ti-adc0832.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * ADC0831/ADC0832/ADC0834/ADC0838 8-bit ADC driver 7 * Datasheet: https://www.ti.com/lit/ds/symlink/adc0832-n.pdf 33 * Max size needed: 16x 1 byte ADC data + 8 bytes timestamp 34 * May be shorter if not all channels are enabled subject 120 static int adc0831_adc_conversion(struct adc0832 *adc) in adc0831_adc_conversion() argument 122 struct spi_device *spi = adc->spi; in adc0831_adc_conversion() 125 ret = spi_read(spi, &adc->rx_buf, 2); in adc0831_adc_conversion() 130 * Skip TRI-STATE and a leading zero in adc0831_adc_conversion() 132 return (adc->rx_buf[0] << 2 & 0xff) | (adc->rx_buf[1] >> 6); in adc0831_adc_conversion() [all …]
|
H A D | ti_am335x_adc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * TI ADC MFD driver 5 * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/ 26 #include <linux/dma-mapping.h> 45 int channels; member 54 static unsigned int tiadc_readl(struct tiadc_device *adc, unsigned int reg) in tiadc_readl() argument 56 return readl(adc->mfd_tscadc->tscadc_base + reg); in tiadc_readl() 59 static void tiadc_writel(struct tiadc_device *adc, unsigned int reg, in tiadc_writel() argument 62 writel(val, adc->mfd_tscadc->tscadc_base + reg); in tiadc_writel() 69 step_en = ((1 << adc_dev->channels) - 1); in get_adc_step_mask() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/input/touchscreen/ |
H A D | resistive-adc-touch.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/input/touchscreen/resistive-adc-touch.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Generic resistive touchscreen ADC 10 - Oleksij Rempel <o.rempel@pengutronix.de> 13 Generic ADC based resistive touchscreen controller 14 The device must be connected to an ADC device that provides channels for 18 - $ref: touchscreen.yaml# 22 const: resistive-adc-touch [all …]
|
/openbmc/linux/drivers/hwmon/ |
H A D | adcxx.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 11 * ADC<bb><c>S<sss>, where 13 * * c is the number of channels (1, 2, 4, 8) 18 * http://www.national.com/ds/DC/ADC<bb><c>S<sss>.pdf 32 #include <linux/hwmon-sysfs.h> 42 u32 channels; member 52 struct adcxx *adc = spi_get_drvdata(spi); in adcxx_show() local 58 if (mutex_lock_interruptible(&adc->lock)) in adcxx_show() 59 return -ERESTARTSYS; in adcxx_show() 61 if (adc->channels == 1) { in adcxx_show() [all …]
|
/openbmc/linux/drivers/thermal/qcom/ |
H A D | qcom-spmi-adc-tm5.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. 12 #include <linux/iio/adc/qcom-vadc-common.h> 26 * Thermal monitoring block consists of 8 (ADC_TM5_NUM_CHANNELS) channels. Each 27 * channel is programmed to use one of ADC channels for voltage comparison. 28 * Voltages are programmed using ADC codes, so we have to convert temp to 29 * voltage and then to ADC code value. 31 * Configuration of TM channels must match configuration of corresponding ADC 32 * channels. 178 * struct adc_tm5_channel - ADC Thermal Monitoring channel data. [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/input/ |
H A D | adc-joystick.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 # Copyright 2019-2020 Artur Rojek 4 --- 5 $id: http://devicetree.org/schemas/input/adc-joystick.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: ADC attached joystick 11 - Artur Rojek <contact@artur-rojek.eu> 14 Bindings for joystick devices connected to ADC controllers supporting 18 - $ref: input.yaml# 22 const: adc-joystick [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/thermal/ |
H A D | qcom-spmi-adc-tm5.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/thermal/qcom-spmi-adc-tm5.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Qualcomm's SPMI PMIC ADC Thermal Monitoring 9 - Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 14 - qcom,spmi-adc-tm5 15 - qcom,spmi-adc-tm5-gen2 16 - qcom,adc-tm7 # Incomplete / subject to change 24 "#thermal-sensor-cells": [all …]
|
/openbmc/linux/arch/arm/boot/dts/ |
H A D | cros-adc-thermistors.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * children of the IIO based ADC. 12 &adc { 15 pullup-uv = <1800000>; 16 pullup-ohm = <47000>; 17 pulldown-ohm = <0>; 18 io-channels = <&adc 3>; 22 pullup-uv = <1800000>; 23 pullup-ohm = <47000>; 24 pulldown-ohm = <0>; [all …]
|
/openbmc/u-boot/test/dm/ |
H A D | adc.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Tests for the driver model ADC API 10 #include <adc.h> 19 #include <sandbox-adc.h> 27 ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc", &dev)); in dm_test_adc_bind() 28 ut_asserteq_str(SANDBOX_ADC_DEVNAME, dev->name); in dm_test_adc_bind() 31 ut_asserteq((1 << SANDBOX_ADC_CHANNELS) - 1, channel_mask); in dm_test_adc_bind() 41 ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc", &dev)); in dm_test_adc_wrong_channel_selection() 42 ut_asserteq(-EINVAL, adc_start_channel(dev, SANDBOX_ADC_CHANNELS)); in dm_test_adc_wrong_channel_selection() 54 ut_assertok(uclass_get_device_by_name(UCLASS_ADC, "adc", &dev)); in dm_test_adc_supply() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/hwmon/ |
H A D | iio-hwmon.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/hwmon/iio-hwmon.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: ADC-attached Hardware Sensor 10 - Jonathan Cameron <jic23@kernel.org> 13 Bindings for hardware monitoring devices connected to ADC controllers 18 const: iio-hwmon 20 io-channels: 24 List of phandles to ADC channels to read the monitoring values [all …]
|