Thread (10 messages) 10 messages, 3 authors, 2016-10-26

[PATCH v7 2/5] iio: adc: mxs-lradc: Add support for adc driver

flat view
STALE3636d REVIEWED: 7 (7M)

From: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Date: 2016-10-02 14:16:14
Also in: linux-iio, lkml
Subsystem: iio subsystem and drivers, the rest · Maintainers: Jonathan Cameron, Linus Torvalds

Revision v7 of 15 in this series; 1 review trailer (1 from subsystem maintainers).

Revisions (15)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v5 [diff vs current]
  6. v6 [diff vs current]
  7. v7 current
  8. v8 [diff vs current]
  9. v9 [diff vs current]
  10. v10 [diff vs current]
  11. v11 [diff vs current]
  12. v12 [diff vs current]
  13. v13 [diff vs current]
  14. v14 [diff vs current]
  15. v15 [diff vs current]
Add support for sixteen-channel 12-bit resolution ADC and its functions,
which include general-purpose ADC readings, battery voltage measurement,
and die temperature measurement.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Reviewed-by: Jonathan Cameron <jic23@kernel.org>
---
Changes in v7:
 - none

Changes in v6:
 - update copyright

Changes in v5:
 - add field void __iomem *base to struct mxs_lradc_adc
 - change arguments in all functions for accessing I/O memory
   to follow the previous change.
 - use devm_ioremap for mapping I/O memory

Changes in v4:
 - update copyright
 - use platform_get_irq_byname
 - use irq_of_parse_and_map

Changes in v3:
 - make buffer large enough for timestamps
 - remove unnecessary blank lines

Changes in v2:
 - improve commit message
 - do not change spacing in Kconfig
 - impove formating
 - remove wrapper show_scale_avail
 - use correct syntax for comments
 - use devm_iio_trigger_alloc
 - do not allocate buffer dynamically
 - use iio_device_claim_*_mode helpers
 - add spinlock in struct mxs_lradc_ts to enable locking in interrupt handler
 - only grab irqs that are relevant to adc
 - remove blank line at the end of the file
 - change licence to GPL
 - add copyright

 drivers/iio/adc/Kconfig  | 13 +++++++++++++
 drivers/iio/adc/Makefile |  1 +
 2 files changed, 14 insertions(+)
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index 7edcf32..6414397 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -207,6 +207,19 @@ config EXYNOS_ADC
 	  To compile this driver as a module, choose M here: the module will be
 	  called exynos_adc.
 
+config MXS_LRADC_ADC
+	tristate "Freescale i.MX23/i.MX28 LRADC ADC"
+	depends on MFD_MXS_LRADC
+	select IIO_BUFFER
+	select IIO_TRIGGERED_BUFFER
+	help
+	  Say yes here to build support for the ADC functions of the
+	  i.MX23/i.MX28 LRADC. This includes general-purpose ADC readings,
+	  battery voltage measurement, and die temperature measurement.
+
+	  This driver can also be built as a module. If so, the module will be
+	  called mxs-lradc-adc.
+
 config FSL_MX25_ADC
 	tristate "Freescale MX25 ADC driver"
 	depends on MFD_MX25_TSADC
diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile
index 7a40c04..e62ebeb 100644
--- a/drivers/iio/adc/Makefile
+++ b/drivers/iio/adc/Makefile
@@ -34,6 +34,7 @@ obj-$(CONFIG_MCP320X) += mcp320x.o
 obj-$(CONFIG_MCP3422) += mcp3422.o
 obj-$(CONFIG_MEDIATEK_MT6577_AUXADC) += mt6577_auxadc.o
 obj-$(CONFIG_MEN_Z188_ADC) += men_z188_adc.o
+obj-$(CONFIG_MXS_LRADC_ADC) += mxs-lradc-adc.o
 obj-$(CONFIG_MXS_LRADC) += mxs-lradc.o
 obj-$(CONFIG_NAU7802) += nau7802.o
 obj-$(CONFIG_PALMAS_GPADC) += palmas_gpadc.o
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help