diff options
author | Ksenija Stanojevic <ksenija.stanojevic@gmail.com> | 2016-02-06 23:23:23 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-02-10 19:29:37 +0000 |
commit | f836c45922446df872250a12dd08e48978aceb2f (patch) | |
tree | 704e390dbe526b790386e185962332125ef08580 /drivers | |
parent | efc945fb729c9b858bb8ab3cf01a3079f32dabc5 (diff) | |
download | linux-stable-f836c45922446df872250a12dd08e48978aceb2f.tar.gz linux-stable-f836c45922446df872250a12dd08e48978aceb2f.tar.bz2 linux-stable-f836c45922446df872250a12dd08e48978aceb2f.zip |
iio: adc: Move mxs-lradc out of staging
Move mxs-lradc driver from drivers/staging/iio/adc to drivers/iio/adc.
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iio/adc/Kconfig | 14 | ||||
-rw-r--r-- | drivers/iio/adc/Makefile | 1 | ||||
-rw-r--r-- | drivers/iio/adc/mxs-lradc.c (renamed from drivers/staging/iio/adc/mxs-lradc.c) | 13 | ||||
-rw-r--r-- | drivers/staging/iio/adc/Kconfig | 14 | ||||
-rw-r--r-- | drivers/staging/iio/adc/Makefile | 1 |
5 files changed, 24 insertions, 19 deletions
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index fd8b53e37bf0..ce152261b438 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig @@ -295,6 +295,20 @@ config MEN_Z188_ADC This driver can also be built as a module. If so, the module will be called men_z188_adc. +config MXS_LRADC + tristate "Freescale i.MX23/i.MX28 LRADC" + depends on (ARCH_MXS || COMPILE_TEST) && HAS_IOMEM + depends on INPUT + select STMP_DEVICE + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER + help + Say yes here to build support for i.MX23/i.MX28 LRADC convertor + built into these chips. + + To compile this driver as a module, choose M here: the + module will be called mxs-lradc. + config NAU7802 tristate "Nuvoton NAU7802 ADC driver" depends on I2C diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile index a3820fa54004..76c008158fa9 100644 --- a/drivers/iio/adc/Makefile +++ b/drivers/iio/adc/Makefile @@ -29,6 +29,7 @@ obj-$(CONFIG_MAX1363) += max1363.o obj-$(CONFIG_MCP320X) += mcp320x.o obj-$(CONFIG_MCP3422) += mcp3422.o obj-$(CONFIG_MEN_Z188_ADC) += men_z188_adc.o +obj-$(CONFIG_MXS_LRADC) += mxs-lradc.o obj-$(CONFIG_NAU7802) += nau7802.o obj-$(CONFIG_PALMAS_GPADC) += palmas_gpadc.o obj-$(CONFIG_QCOM_SPMI_IADC) += qcom-spmi-iadc.o diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/iio/adc/mxs-lradc.c index bb1f15224ac8..33051b87aac2 100644 --- a/drivers/staging/iio/adc/mxs-lradc.c +++ b/drivers/iio/adc/mxs-lradc.c @@ -443,7 +443,8 @@ static void mxs_lradc_setup_ts_channel(struct mxs_lradc *lradc, unsigned ch) LRADC_CH_NUM_SAMPLES(lradc->over_sample_cnt - 1), LRADC_CH(ch)); - /* from the datasheet: + /* + * from the datasheet: * "Software must clear this register in preparation for a * multi-cycle accumulation. */ @@ -504,7 +505,8 @@ static void mxs_lradc_setup_ts_pressure(struct mxs_lradc *lradc, unsigned ch1, mxs_lradc_reg_wrt(lradc, reg, LRADC_CH(ch1)); mxs_lradc_reg_wrt(lradc, reg, LRADC_CH(ch2)); - /* from the datasheet: + /* + * from the datasheet: * "Software must clear this register in preparation for a * multi-cycle accumulation. */ @@ -914,7 +916,8 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_dev, case IIO_CHAN_INFO_SCALE: if (chan->type == IIO_TEMP) { - /* From the datasheet, we have to multiply by 1.012 and + /* + * From the datasheet, we have to multiply by 1.012 and * divide by 4 */ *val = 0; @@ -929,7 +932,8 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_dev, case IIO_CHAN_INFO_OFFSET: if (chan->type == IIO_TEMP) { - /* The calculated value from the ADC is in Kelvin, we + /* + * The calculated value from the ADC is in Kelvin, we * want Celsius for hwmon so the offset is -273.15 * The offset is applied before scaling so it is * actually -213.15 * 4 / 1.012 = -1079.644268 @@ -1750,6 +1754,7 @@ static int mxs_lradc_remove(struct platform_device *pdev) iio_triggered_buffer_cleanup(iio); clk_disable_unprepare(lradc->clk); + return 0; } diff --git a/drivers/staging/iio/adc/Kconfig b/drivers/staging/iio/adc/Kconfig index a700f1951cd9..41ed3fe76fc9 100644 --- a/drivers/staging/iio/adc/Kconfig +++ b/drivers/staging/iio/adc/Kconfig @@ -91,20 +91,6 @@ config LPC32XX_ADC activate only one via device tree selection. Provides direct access via sysfs. -config MXS_LRADC - tristate "Freescale i.MX23/i.MX28 LRADC" - depends on (ARCH_MXS || COMPILE_TEST) && HAS_IOMEM - depends on INPUT - select STMP_DEVICE - select IIO_BUFFER - select IIO_TRIGGERED_BUFFER - help - Say yes here to build support for i.MX23/i.MX28 LRADC convertor - built into these chips. - - To compile this driver as a module, choose M here: the - module will be called mxs-lradc. - config SPEAR_ADC tristate "ST SPEAr ADC" depends on PLAT_SPEAR || COMPILE_TEST diff --git a/drivers/staging/iio/adc/Makefile b/drivers/staging/iio/adc/Makefile index 0c87ce3530f8..3cdd83ccec8e 100644 --- a/drivers/staging/iio/adc/Makefile +++ b/drivers/staging/iio/adc/Makefile @@ -12,5 +12,4 @@ obj-$(CONFIG_AD7816) += ad7816.o obj-$(CONFIG_AD7192) += ad7192.o obj-$(CONFIG_AD7280) += ad7280a.o obj-$(CONFIG_LPC32XX_ADC) += lpc32xx_adc.o -obj-$(CONFIG_MXS_LRADC) += mxs-lradc.o obj-$(CONFIG_SPEAR_ADC) += spear_adc.o |