Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Lars-Peter Clausen and committed by
Jonathan Cameron
3b1cae7c cfa71bf3

+18 -14
+10
drivers/iio/adc/Kconfig
··· 20 20 Say yes here to build support for Analog Devices AD7265 and AD7266 21 21 ADCs. 22 22 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 + 23 33 config AD7298 24 34 tristate "Analog Devices AD7298 ADC driver" 25 35 depends on SPI
+1
drivers/iio/adc/Makefile
··· 5 5 # When adding new entries keep the list in alphabetical order 6 6 obj-$(CONFIG_AD_SIGMA_DELTA) += ad_sigma_delta.o 7 7 obj-$(CONFIG_AD7266) += ad7266.o 8 + obj-$(CONFIG_AD7291) += ad7291.o 8 9 obj-$(CONFIG_AD7298) += ad7298.o 9 10 obj-$(CONFIG_AD7923) += ad7923.o 10 11 obj-$(CONFIG_AD7476) += ad7476.o
-7
drivers/staging/iio/adc/Kconfig
··· 3 3 # 4 4 menu "Analog to digital converters" 5 5 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 - 13 6 config AD7606 14 7 tristate "Analog Devices AD7606 ADC driver" 15 8 depends on GPIOLIB
-1
drivers/staging/iio/adc/Makefile
··· 8 8 ad7606-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o 9 9 obj-$(CONFIG_AD7606) += ad7606.o 10 10 11 - obj-$(CONFIG_AD7291) += ad7291.o 12 11 obj-$(CONFIG_AD7780) += ad7780.o 13 12 obj-$(CONFIG_AD7816) += ad7816.o 14 13 obj-$(CONFIG_AD7192) += ad7192.o
+7 -6
drivers/staging/iio/adc/ad7291.c drivers/iio/adc/ad7291.c
··· 6 6 * Licensed under the GPL-2 or later. 7 7 */ 8 8 9 - #include <linux/interrupt.h> 10 9 #include <linux/device.h> 11 - #include <linux/kernel.h> 12 - #include <linux/slab.h> 13 - #include <linux/sysfs.h> 10 + #include <linux/err.h> 14 11 #include <linux/i2c.h> 12 + #include <linux/interrupt.h> 13 + #include <linux/kernel.h> 15 14 #include <linux/module.h> 16 15 #include <linux/mutex.h> 17 16 #include <linux/regulator/consumer.h> 18 - #include <linux/err.h> 17 + #include <linux/slab.h> 18 + #include <linux/sysfs.h> 19 19 20 20 #include <linux/iio/iio.h> 21 21 #include <linux/iio/sysfs.h> 22 22 #include <linux/iio/events.h> 23 23 24 - #include "ad7291.h" 24 + #include <linux/platform_data/ad7291.h> 25 25 26 26 /* 27 27 * Simplified handling ··· 379 379 case IIO_VOLTAGE: 380 380 if (chip->reg) { 381 381 int vref; 382 + 382 383 vref = regulator_get_voltage(chip->reg); 383 384 if (vref < 0) 384 385 return vref;
drivers/staging/iio/adc/ad7291.h include/linux/platform_data/ad7291.h