2012-05-11 21:35:33 +08:00
|
|
|
#
|
|
|
|
# ADC drivers
|
|
|
|
#
|
|
|
|
menu "Analog to digital converters"
|
|
|
|
|
2012-08-11 00:36:00 +08:00
|
|
|
config AD_SIGMA_DELTA
|
|
|
|
tristate
|
|
|
|
select IIO_BUFFER
|
|
|
|
select IIO_TRIGGERED_BUFFER
|
|
|
|
|
2012-06-25 20:52:49 +08:00
|
|
|
config AD7266
|
|
|
|
tristate "Analog Devices AD7265/AD7266 ADC driver"
|
|
|
|
depends on SPI_MASTER
|
|
|
|
select IIO_BUFFER
|
|
|
|
select IIO_TRIGGER
|
|
|
|
select IIO_TRIGGERED_BUFFER
|
|
|
|
help
|
|
|
|
Say yes here to build support for Analog Devices AD7265 and AD7266
|
|
|
|
ADCs.
|
|
|
|
|
2012-09-04 23:26:00 +08:00
|
|
|
config AD7791
|
|
|
|
tristate "Analog Devices AD7791 ADC driver"
|
|
|
|
depends on SPI
|
|
|
|
select AD_SIGMA_DELTA
|
|
|
|
help
|
|
|
|
Say yes here to build support for Analog Devices AD7787, AD7788, AD7789,
|
|
|
|
AD7790 and AD7791 SPI analog to digital converters (ADC). If unsure, say
|
|
|
|
N (but it is safe to say "Y").
|
|
|
|
|
|
|
|
To compile this driver as a module, choose M here: the module will be
|
|
|
|
called ad7791.
|
|
|
|
|
2012-09-10 16:34:00 +08:00
|
|
|
config AD7476
|
2012-09-10 16:34:00 +08:00
|
|
|
tristate "Analog Devices AD7476 and similar 1-channel ADCs driver"
|
2012-09-10 16:34:00 +08:00
|
|
|
depends on SPI
|
|
|
|
select IIO_BUFFER
|
|
|
|
select IIO_TRIGGERED_BUFFER
|
|
|
|
help
|
2012-09-10 17:33:00 +08:00
|
|
|
Say yes here to build support for Analog Devices AD7273, AD7274, AD7276,
|
|
|
|
AD7277, AD7278, AD7475, AD7476, AD7477, AD7478, AD7466, AD7467, AD7468,
|
|
|
|
AD7495, AD7910, AD7920, AD7920 SPI analog to digital converters (ADC).
|
2012-09-10 16:34:00 +08:00
|
|
|
|
2012-09-10 16:34:00 +08:00
|
|
|
If unsure, say N (but it's safe to say "Y").
|
|
|
|
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
|
|
module will be called ad7476.
|
|
|
|
|
2012-05-11 21:35:33 +08:00
|
|
|
config AT91_ADC
|
|
|
|
tristate "Atmel AT91 ADC"
|
|
|
|
depends on ARCH_AT91
|
|
|
|
select IIO_BUFFER
|
2012-06-19 00:33:49 +08:00
|
|
|
select IIO_TRIGGERED_BUFFER
|
2012-05-11 21:35:33 +08:00
|
|
|
select SYSFS
|
|
|
|
help
|
|
|
|
Say yes here to build support for Atmel AT91 ADC.
|
|
|
|
|
iio: adc: add new lp8788 adc driver
TI LP8788 PMU provides regulators, battery charger, ADC,
RTC, backlight driver and current sinks.
This patch enables the LP8788 ADC functions.
The LP8788 ADC has several ADC input selection and supports 12bit resolution.
Internal operation of getting ADC is access to registers of LP8788.
The LP8788 ADC uses exported functions for accessing these registers.
(exported by LP8788 MFD device driver)
This driver supports IIO_CHAN_INFO_RAW and SCALE.
So the IIO consumer can calculate the value with raw and scale.
The unit of scale is micro.
(ADC Input Selection)
Voltage: battery voltage (MAX 5.0, 5.5 and 6.0V)
charger input voltage
four general ADC inputs
coin cell voltage
Current: battery charging current
Temperature: IC temperature
(The IIO map for the IIO consumer)
The ADC input is configurable in the platform side.
Even though this platform data is not defined,
the default IIO map is created for supporting the power supply driver.
The battery voltage and temperature are used inside this driver.
(History)
Patch v6.
(a) Fix scale value for each ADC input selection
Voltage and current type are mili unit and temperature is degree.
To calculate the IC temperature,
temp = raw * scaleint + (raw * scalepart)/ 1000000, scaleint is always 0.
= raw * 0.061050, raw: 0 ~ 4095
Then range of IC temperature(ADC result) is 0 ~ 250'C
(b) Reorganization of the IIO channel Spec
Remove address, scan_type and scan_index and rollback the datasheet name.
The reason why 'address' field is unnecessary is no relation with each channel.
Moreover, to get the raw ADC value, the address info is not only one register
but also several registers.
Therefore specific function(lp8788_get_adc_result) is called rather than
using one 'address' field.
(c) Fix coding style
Remove duplicated checking routine while unregistering the IIO map.
Fix code for space and parenthesis.
Patch v5.
Fix default consumer name as 'lp8788-charger'.
Add mutex for ADC read operation.
Reorganization on lp8788_adc_read_raw().
Patch v4.
Fix adc_raw function: support RAW and SCALE channel info.
Change LP8788 ADC platform data - iio map.
Enables the default IIO map.
Patch v3.
Fix wrong size of allocating iio private data.
Fix coding styles.
Patch v2.
Support RAW and SCALE interface for IIO consumer.
Clean up the iio channel spec macro.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-17 17:35:00 +08:00
|
|
|
config LP8788_ADC
|
|
|
|
bool "LP8788 ADC driver"
|
|
|
|
depends on MFD_LP8788
|
|
|
|
help
|
|
|
|
Say yes here to build support for TI LP8788 ADC.
|
|
|
|
|
2012-10-16 15:25:45 +08:00
|
|
|
config TI_AM335X_ADC
|
|
|
|
tristate "TI's ADC driver"
|
|
|
|
depends on MFD_TI_AM335X_TSCADC
|
|
|
|
help
|
|
|
|
Say yes here to build support for Texas Instruments ADC
|
|
|
|
driver which is also a MFD client.
|
|
|
|
|
2012-05-11 21:35:33 +08:00
|
|
|
endmenu
|