diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-11-21 17:27:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-11-30 13:57:08 +0100 |
commit | f87f1a2375a51ef8c5048bfce42587dbea1ca627 (patch) | |
tree | 8738bc7e299e45272933477510ad208d957a0795 /drivers | |
parent | staging:iio:ad7793: Implement stricter id checking (diff) | |
download | linux-f87f1a2375a51ef8c5048bfce42587dbea1ca627.tar.xz linux-f87f1a2375a51ef8c5048bfce42587dbea1ca627.zip |
staging:iio: Move ad7793 driver out of staging
The driver does not expose any custom API to userspace and none of the standard
static code checker tools report any issues, so move it out of staging.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iio/adc/Kconfig | 12 | ||||
-rw-r--r-- | drivers/iio/adc/Makefile | 1 | ||||
-rw-r--r-- | drivers/iio/adc/ad7793.c (renamed from drivers/staging/iio/adc/ad7793.c) | 3 | ||||
-rw-r--r-- | drivers/staging/iio/adc/Kconfig | 12 | ||||
-rw-r--r-- | drivers/staging/iio/adc/Makefile | 1 | ||||
-rw-r--r-- | drivers/staging/iio/adc/ad7793.h | 116 |
6 files changed, 14 insertions, 131 deletions
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index cd5eed60be28..408557b02441 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig @@ -42,6 +42,18 @@ config AD7791 To compile this driver as a module, choose M here: the module will be called ad7791. +config AD7793 + tristate "Analog Devices AD7793 and similar ADCs driver" + depends on SPI + select AD_SIGMA_DELTA + help + Say yes here to build support for Analog Devices AD7785, AD7792, AD7793, + AD7794 and AD7795 SPI analog to digital converters (ADC). + 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 AD7793. + config AD7476 tristate "Analog Devices AD7476 and similar 1-channel ADCs driver" depends on SPI diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile index 3256dc64a466..78202d9eb961 100644 --- a/drivers/iio/adc/Makefile +++ b/drivers/iio/adc/Makefile @@ -7,6 +7,7 @@ obj-$(CONFIG_AD7266) += ad7266.o obj-$(CONFIG_AD7298) += ad7298.o obj-$(CONFIG_AD7476) += ad7476.o obj-$(CONFIG_AD7791) += ad7791.o +obj-$(CONFIG_AD7793) += ad7793.o obj-$(CONFIG_AD7887) += ad7887.o obj-$(CONFIG_AT91_ADC) += at91_adc.o obj-$(CONFIG_LP8788_ADC) += lp8788_adc.o diff --git a/drivers/staging/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c index 8928609a1828..a109e686b9f7 100644 --- a/drivers/staging/iio/adc/ad7793.c +++ b/drivers/iio/adc/ad7793.c @@ -25,8 +25,7 @@ #include <linux/iio/trigger_consumer.h> #include <linux/iio/triggered_buffer.h> #include <linux/iio/adc/ad_sigma_delta.h> - -#include "ad7793.h" +#include <linux/platform_data/ad7793.h> /* Registers */ #define AD7793_REG_COMM 0 /* Communications Register (WO, 8-bit) */ diff --git a/drivers/staging/iio/adc/Kconfig b/drivers/staging/iio/adc/Kconfig index dc8582b95b61..fb8c239b0c88 100644 --- a/drivers/staging/iio/adc/Kconfig +++ b/drivers/staging/iio/adc/Kconfig @@ -70,18 +70,6 @@ config AD7780 To compile this driver as a module, choose M here: the module will be called ad7780. -config AD7793 - tristate "Analog Devices AD7793 and similar ADCs driver" - depends on SPI - select AD_SIGMA_DELTA - help - Say yes here to build support for Analog Devices AD7785, AD7792, AD7793, - AD7794 and AD7795 SPI analog to digital converters (ADC). - 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 AD7793. - config AD7816 tristate "Analog Devices AD7816/7/8 temperature sensor and ADC driver" depends on SPI diff --git a/drivers/staging/iio/adc/Makefile b/drivers/staging/iio/adc/Makefile index 7281451a613a..d285596272a0 100644 --- a/drivers/staging/iio/adc/Makefile +++ b/drivers/staging/iio/adc/Makefile @@ -14,7 +14,6 @@ obj-$(CONFIG_AD799X) += ad799x.o obj-$(CONFIG_AD7291) += ad7291.o obj-$(CONFIG_AD7780) += ad7780.o -obj-$(CONFIG_AD7793) += ad7793.o obj-$(CONFIG_AD7816) += ad7816.o obj-$(CONFIG_AD7192) += ad7192.o obj-$(CONFIG_ADT7410) += adt7410.o diff --git a/drivers/staging/iio/adc/ad7793.h b/drivers/staging/iio/adc/ad7793.h deleted file mode 100644 index 0e455de215e4..000000000000 --- a/drivers/staging/iio/adc/ad7793.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * AD7792/AD7793 SPI ADC driver - * - * Copyright 2011 Analog Devices Inc. - * - * Licensed under the GPL-2. - */ -#ifndef IIO_ADC_AD7793_H_ -#define IIO_ADC_AD7793_H_ - -/* - * TODO: struct ad7793_platform_data needs to go into include/linux/iio - */ - -/** - * enum ad7793_clock_source - AD7793 clock source selection - * @AD7793_CLK_SRC_INT: Internal 64 kHz clock, not available at the CLK pin. - * @AD7793_CLK_SRC_INT_CO: Internal 64 kHz clock, available at the CLK pin. - * @AD7793_CLK_SRC_EXT: Use external clock. - * @AD7793_CLK_SRC_EXT_DIV2: Use external clock divided by 2. - */ -enum ad7793_clock_source { - AD7793_CLK_SRC_INT, - AD7793_CLK_SRC_INT_CO, - AD7793_CLK_SRC_EXT, - AD7793_CLK_SRC_EXT_DIV2, -}; - -/** - * enum ad7793_bias_voltage - AD7793 bias voltage selection - * @AD7793_BIAS_VOLTAGE_DISABLED: Bias voltage generator disabled - * @AD7793_BIAS_VOLTAGE_AIN1: Bias voltage connected to AIN1(-). - * @AD7793_BIAS_VOLTAGE_AIN2: Bias voltage connected to AIN2(-). - * @AD7793_BIAS_VOLTAGE_AIN3: Bias voltage connected to AIN3(-). - * Only valid for AD7795/AD7796. - */ -enum ad7793_bias_voltage { - AD7793_BIAS_VOLTAGE_DISABLED, - AD7793_BIAS_VOLTAGE_AIN1, - AD7793_BIAS_VOLTAGE_AIN2, - AD7793_BIAS_VOLTAGE_AIN3, -}; - -/** - * enum ad7793_refsel - AD7793 reference voltage selection - * @AD7793_REFSEL_REFIN1: External reference applied between REFIN1(+) - * and REFIN1(-). - * @AD7793_REFSEL_REFIN2: External reference applied between REFIN2(+) and - * and REFIN1(-). Only valid for AD7795/AD7796. - * @AD7793_REFSEL_INTERNAL: Internal 1.17 V reference. - */ -enum ad7793_refsel { - AD7793_REFSEL_REFIN1 = 0, - AD7793_REFSEL_REFIN2 = 1, - AD7793_REFSEL_INTERNAL = 2, -}; - -/** - * enum ad7793_current_source_direction - AD7793 excitation current direction - * @AD7793_IEXEC1_IOUT1_IEXEC2_IOUT2: Current source IEXC1 connected to pin - * IOUT1, current source IEXC2 connected to pin IOUT2. - * @AD7793_IEXEC1_IOUT2_IEXEC2_IOUT1: Current source IEXC2 connected to pin - * IOUT1, current source IEXC1 connected to pin IOUT2. - * @AD7793_IEXEC1_IEXEC2_IOUT1: Both current sources connected to pin IOUT1. - * Only valid when the current sources are set to 10 uA or 210 uA. - * @AD7793_IEXEC1_IEXEC2_IOUT2: Both current sources connected to Pin IOUT2. - * Only valid when the current ources are set to 10 uA or 210 uA. - */ -enum ad7793_current_source_direction { - AD7793_IEXEC1_IOUT1_IEXEC2_IOUT2 = 0, - AD7793_IEXEC1_IOUT2_IEXEC2_IOUT1 = 1, - AD7793_IEXEC1_IEXEC2_IOUT1 = 2, - AD7793_IEXEC1_IEXEC2_IOUT2 = 3, -}; - -/** - * enum ad7793_excitation_current - AD7793 excitation current selection - * @AD7793_IX_DISABLED: Excitation current Disabled. - * @AD7793_IX_10uA: Enable 10 micro-ampere excitation current. - * @AD7793_IX_210uA: Enable 210 micro-ampere excitation current. - * @AD7793_IX_1mA: Enable 1 milli-Ampere excitation current. - */ -enum ad7793_excitation_current { - AD7793_IX_DISABLED = 0, - AD7793_IX_10uA = 1, - AD7793_IX_210uA = 2, - AD7793_IX_1mA = 3, -}; - -/** - * struct ad7793_platform_data - AD7793 platform data - * @clock_src: Clock source selection - * @burnout_current: If set to true the 100nA burnout current is enabled. - * @boost_enable: Enable boost for the bias voltage generator. - * @buffered: If set to true configure the device for buffered input mode. - * @unipolar: If set to true sample in unipolar mode, if set to false sample in - * bipolar mode. - * @refsel: Reference voltage selection - * @bias_voltage: Bias voltage selection - * @exitation_current: Excitation current selection - * @current_source_direction: Excitation current direction selection - */ -struct ad7793_platform_data { - enum ad7793_clock_source clock_src; - bool burnout_current; - bool boost_enable; - bool buffered; - bool unipolar; - - enum ad7793_refsel refsel; - enum ad7793_bias_voltage bias_voltage; - enum ad7793_excitation_current exitation_current; - enum ad7793_current_source_direction current_source_direction; -}; - -#endif /* IIO_ADC_AD7793_H_ */ |