Skip to content

Commit 3b1cae7

Browse files
larsclausenjic23
authored andcommitted
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>
1 parent cfa71bf commit 3b1cae7

6 files changed

Lines changed: 18 additions & 14 deletions

File tree

‎drivers/iio/adc/Kconfig‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ config AD7266
2020
Say yes here to build support for Analog Devices AD7265 and AD7266
2121
ADCs.
2222

23+
config 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+
2333
config AD7298
2434
tristate "Analog Devices AD7298 ADC driver"
2535
depends on SPI

‎drivers/iio/adc/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# When adding new entries keep the list in alphabetical order
66
obj-$(CONFIG_AD_SIGMA_DELTA) += ad_sigma_delta.o
77
obj-$(CONFIG_AD7266) += ad7266.o
8+
obj-$(CONFIG_AD7291) += ad7291.o
89
obj-$(CONFIG_AD7298) += ad7298.o
910
obj-$(CONFIG_AD7923) += ad7923.o
1011
obj-$(CONFIG_AD7476) += ad7476.o
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
* Licensed under the GPL-2 or later.
77
*/
88

9-
#include <linux/interrupt.h>
109
#include <linux/device.h>
11-
#include <linux/kernel.h>
12-
#include <linux/slab.h>
13-
#include <linux/sysfs.h>
10+
#include <linux/err.h>
1411
#include <linux/i2c.h>
12+
#include <linux/interrupt.h>
13+
#include <linux/kernel.h>
1514
#include <linux/module.h>
1615
#include <linux/mutex.h>
1716
#include <linux/regulator/consumer.h>
18-
#include <linux/err.h>
17+
#include <linux/slab.h>
18+
#include <linux/sysfs.h>
1919

2020
#include <linux/iio/iio.h>
2121
#include <linux/iio/sysfs.h>
2222
#include <linux/iio/events.h>
2323

24-
#include "ad7291.h"
24+
#include <linux/platform_data/ad7291.h>
2525

2626
/*
2727
* Simplified handling
@@ -379,6 +379,7 @@ static int ad7291_read_raw(struct iio_dev *indio_dev,
379379
case IIO_VOLTAGE:
380380
if (chip->reg) {
381381
int vref;
382+
382383
vref = regulator_get_voltage(chip->reg);
383384
if (vref < 0)
384385
return vref;

‎drivers/staging/iio/adc/Kconfig‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@
33
#
44
menu "Analog to digital converters"
55

6-
config 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-
136
config AD7606
147
tristate "Analog Devices AD7606 ADC driver"
158
depends on GPIOLIB

‎drivers/staging/iio/adc/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ ad7606-$(CONFIG_AD7606_IFACE_PARALLEL) += ad7606_par.o
88
ad7606-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o
99
obj-$(CONFIG_AD7606) += ad7606.o
1010

11-
obj-$(CONFIG_AD7291) += ad7291.o
1211
obj-$(CONFIG_AD7780) += ad7780.o
1312
obj-$(CONFIG_AD7816) += ad7816.o
1413
obj-$(CONFIG_AD7192) += ad7192.o

0 commit comments

Comments
 (0)