aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-06-30 04:50:00 -0400
committerJonathan Cameron <jic23@kernel.org>2014-07-08 16:17:30 -0400
commit3b1cae7c2c2b801b8530db07a02587bc1a41b3fe (patch)
treebe8dcd14bd0ff70d076eb8b1b26b87592fb68e77
parentcfa71bf35c87c79ad9a03a29a7426b495446b2bf (diff)
staging:iio:ad7291: Move out of staging
The ad7291 driver is in a reasonable shape. It does not use non-standard API/ABI and there are no major style issues with the driver. So this patch moves it out of staging. There is one small warning from checkpatch which is also fixed in this patch. The patch also sorts the #include directives in alphabetical order. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/iio/adc/Kconfig10
-rw-r--r--drivers/iio/adc/Makefile1
-rw-r--r--drivers/iio/adc/ad7291.c (renamed from drivers/staging/iio/adc/ad7291.c)13
-rw-r--r--drivers/staging/iio/adc/Kconfig7
-rw-r--r--drivers/staging/iio/adc/Makefile1
-rw-r--r--include/linux/platform_data/ad7291.h (renamed from drivers/staging/iio/adc/ad7291.h)0
6 files changed, 18 insertions, 14 deletions
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index 20a7073f1dd6..11b048a59fde 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -20,6 +20,16 @@ config AD7266
20 Say yes here to build support for Analog Devices AD7265 and AD7266 20 Say yes here to build support for Analog Devices AD7265 and AD7266
21 ADCs. 21 ADCs.
22 22
23config AD7291
24 tristate "Analog Devices AD7291 ADC driver"
25 depends on I2C
26 help
27 Say yes here to build support for Analog Devices AD7291
28 8 Channel ADC with temperature sensor.
29
30 To compile this driver as a module, choose M here: the
31 module will be called ad7291.
32
23config AD7298 33config AD7298
24 tristate "Analog Devices AD7298 ADC driver" 34 tristate "Analog Devices AD7298 ADC driver"
25 depends on SPI 35 depends on SPI
diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile
index 38cf5c3f5631..ad81b512aa3d 100644
--- a/drivers/iio/adc/Makefile
+++ b/drivers/iio/adc/Makefile
@@ -5,6 +5,7 @@
5# When adding new entries keep the list in alphabetical order 5# When adding new entries keep the list in alphabetical order
6obj-$(CONFIG_AD_SIGMA_DELTA) += ad_sigma_delta.o 6obj-$(CONFIG_AD_SIGMA_DELTA) += ad_sigma_delta.o
7obj-$(CONFIG_AD7266) += ad7266.o 7obj-$(CONFIG_AD7266) += ad7266.o
8obj-$(CONFIG_AD7291) += ad7291.o
8obj-$(CONFIG_AD7298) += ad7298.o 9obj-$(CONFIG_AD7298) += ad7298.o
9obj-$(CONFIG_AD7923) += ad7923.o 10obj-$(CONFIG_AD7923) += ad7923.o
10obj-$(CONFIG_AD7476) += ad7476.o 11obj-$(CONFIG_AD7476) += ad7476.o
diff --git a/drivers/staging/iio/adc/ad7291.c b/drivers/iio/adc/ad7291.c
index 9139958da787..4ed78b94afd8 100644
--- a/drivers/staging/iio/adc/ad7291.c
+++ b/drivers/iio/adc/ad7291.c
@@ -6,22 +6,22 @@
6 * Licensed under the GPL-2 or later. 6 * Licensed under the GPL-2 or later.
7 */ 7 */
8 8
9#include <linux/interrupt.h>
10#include <linux/device.h> 9#include <linux/device.h>
11#include <linux/kernel.h> 10#include <linux/err.h>
12#include <linux/slab.h>
13#include <linux/sysfs.h>
14#include <linux/i2c.h> 11#include <linux/i2c.h>
12#include <linux/interrupt.h>
13#include <linux/kernel.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/mutex.h> 15#include <linux/mutex.h>
17#include <linux/regulator/consumer.h> 16#include <linux/regulator/consumer.h>
18#include <linux/err.h> 17#include <linux/slab.h>
18#include <linux/sysfs.h>
19 19
20#include <linux/iio/iio.h> 20#include <linux/iio/iio.h>
21#include <linux/iio/sysfs.h> 21#include <linux/iio/sysfs.h>
22#include <linux/iio/events.h> 22#include <linux/iio/events.h>
23 23
24#include "ad7291.h" 24#include <linux/platform_data/ad7291.h>
25 25
26/* 26/*
27 * Simplified handling 27 * Simplified handling
@@ -379,6 +379,7 @@ static int ad7291_read_raw(struct iio_dev *indio_dev,
379 case IIO_VOLTAGE: 379 case IIO_VOLTAGE:
380 if (chip->reg) { 380 if (chip->reg) {
381 int vref; 381 int vref;
382
382 vref = regulator_get_voltage(chip->reg); 383 vref = regulator_get_voltage(chip->reg);
383 if (vref < 0) 384 if (vref < 0)
384 return vref; 385 return vref;
diff --git a/drivers/staging/iio/adc/Kconfig b/drivers/staging/iio/adc/Kconfig
index b87e382ad768..75d2d1bf93d1 100644
--- a/drivers/staging/iio/adc/Kconfig
+++ b/drivers/staging/iio/adc/Kconfig
@@ -3,13 +3,6 @@
3# 3#
4menu "Analog to digital converters" 4menu "Analog to digital converters"
5 5
6config AD7291
7 tristate "Analog Devices AD7291 ADC driver"
8 depends on I2C
9 help
10 Say yes here to build support for Analog Devices AD7291
11 8 Channel ADC with temperature sensor.
12
13config AD7606 6config AD7606
14 tristate "Analog Devices AD7606 ADC driver" 7 tristate "Analog Devices AD7606 ADC driver"
15 depends on GPIOLIB 8 depends on GPIOLIB
diff --git a/drivers/staging/iio/adc/Makefile b/drivers/staging/iio/adc/Makefile
index afdcd1ff08ff..1c4277dbd318 100644
--- a/drivers/staging/iio/adc/Makefile
+++ b/drivers/staging/iio/adc/Makefile
@@ -8,7 +8,6 @@ ad7606-$(CONFIG_AD7606_IFACE_PARALLEL) += ad7606_par.o
8ad7606-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o 8ad7606-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o
9obj-$(CONFIG_AD7606) += ad7606.o 9obj-$(CONFIG_AD7606) += ad7606.o
10 10
11obj-$(CONFIG_AD7291) += ad7291.o
12obj-$(CONFIG_AD7780) += ad7780.o 11obj-$(CONFIG_AD7780) += ad7780.o
13obj-$(CONFIG_AD7816) += ad7816.o 12obj-$(CONFIG_AD7816) += ad7816.o
14obj-$(CONFIG_AD7192) += ad7192.o 13obj-$(CONFIG_AD7192) += ad7192.o
diff --git a/drivers/staging/iio/adc/ad7291.h b/include/linux/platform_data/ad7291.h
index bbd89fa51188..bbd89fa51188 100644
--- a/drivers/staging/iio/adc/ad7291.h
+++ b/include/linux/platform_data/ad7291.h