summary refs log tree commit diff
path: root/drivers/iio/adc
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-24 22:53:52 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-24 22:53:52 +0100
commitdc5f2c5f6aa159ebf4b29b169aa1f71cf98d3d6a (patch)
treef9fd13fd4025e8844adbe27383cfcd1ad9c5106f /drivers/iio/adc
parentc754ff966d54b3a6cb45cd57524186a16e7f5831 (diff)
parentc0644160a8b5e56b3c3896d77ac3d50d41fa9336 (diff)
downloadlinux-dc5f2c5f6aa159ebf4b29b169aa1f71cf98d3d6a.tar.gz
Merge tag 'iio-for-4.1a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:

First set of new drivers, cleanups and functionality for IIO in the 4.1 cycle.

New drivers
* CM3323 color sensor.
* MS5611 pressure and temperature sensor.

New functionality
* mup6050 - create mux clients for devices described via ACPI. The reasoning
     and approach taken in this patch are complex.  Basically there is no
     otherway of finding out what is there than by some esoteric look ups in
     the ACPI data.
* cm3232 - PM support
* itg3200 - suspend/resume support
* mcp320x - add more ADCs to the kconfig to reflect what the driver supports
     (this patch and the bindings got left behind when the support was added
      a while back).

Docs / utils
* ti-adc128s052 - DT bindings.
* mcp3422 - DT bindings.
* mcp320x - DT bindings
* ABI docs for event threshold scale attributes, in_magn_offset, proximity
  scan_element and thresh falling/rising values for accelerometers.  All
  elements long in use that have slipped by being explicitly documented.
* Tidy up the tools previously in drivers/staging/iio/Documentation and move
  them out to /tools/iio. Yet another move that should have happened long ago.
  This time Roberta Dobrescu did the leg work.  Thanks!

Core Cleanups
* Export userspace IIO headers.  We should have done the appropriate header
  splitting a long time ago. Thanks to Daniel for sorting this out.

* Refactor the registring of attributes for buffers to move all non-custom
  ones to a vector allowing easier additions to the current set in the future.

Driver Cleanups
* gpiod related cleanups.  Make use of the additional parameter to specify
  	initial direciton to avoid extra code.
* bmc150 - Various refactorings to reduce code repitition and prepare for
           hardware buffer support.  Some of these cleanups are good even
	   without the new functionality.
* kmx61 - direct use of index to an array avoiding a structure element which
          was always the index to an element in an array of that structure.
* vf610 - avoid incorrect type for return from wait_for_completion_timeout.
* gp2ap020a00f - use put_unaligned_le32 for slight code simplification.
* ade7754 - improve error handling including suppressing some build warnings.
* ade7759 - improve error handling including suppressing some build warnings.
* hmc5843 - Long line and indentation fixes. Also some constifying of various
      constant data.
* ade7854 - 80+ character line splitting.
* ad2s1210 - fix wrong printf format string.
* mxs-lradc - fix wrong printf format string.
* ade7954-i2c - code alignment fixes and other trivial but worthwhile bits.
* periodic rtc trigger - make the frequency type an unsigned int as it
  is always treated as such.
* jsa1212 - constify struct regmap_config as it is constant.
* ad7793 - typo in the MODULE_DESCRIPTION
* mma9551 - check gpiod_to_irq errors.  Note that this doesn't actually cause
    any trouble but is worth tidying up as obviously incorrect.
* mlx90614 - refactor the register symbols to make it clear which reads are to
    RAM not PROM.
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r--drivers/iio/adc/Kconfig5
-rw-r--r--drivers/iio/adc/ad7793.c2
-rw-r--r--drivers/iio/adc/vf610_adc.c5
3 files changed, 5 insertions, 7 deletions
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index 202daf889be2..9eaa8d1e582d 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -186,10 +186,11 @@ config MAX1363
 	  data via the iio dev interface.
 
 config MCP320X
-	tristate "Microchip Technology MCP3204/08"
+	tristate "Microchip Technology MCP3x01/02/04/08"
 	depends on SPI
 	help
-	  Say yes here to build support for Microchip Technology's MCP3204 or
+	  Say yes here to build support for Microchip Technology's
+	  MCP3001, MCP3002, MCP3004, MCP3008, MCP3201, MCP3202, MCP3204 or
 	  MCP3208 analog to digital converter.
 
 	  This driver can also be built as a module. If so, the module will be
diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c
index 4dddeabdfbb0..b84922a4b32e 100644
--- a/drivers/iio/adc/ad7793.c
+++ b/drivers/iio/adc/ad7793.c
@@ -861,5 +861,5 @@ static struct spi_driver ad7793_driver = {
 module_spi_driver(ad7793_driver);
 
 MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
-MODULE_DESCRIPTION("Analog Devices AD7793 and simialr ADCs");
+MODULE_DESCRIPTION("Analog Devices AD7793 and similar ADCs");
 MODULE_LICENSE("GPL v2");
diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c
index 8ec353c01d98..5b72d170fd36 100644
--- a/drivers/iio/adc/vf610_adc.c
+++ b/drivers/iio/adc/vf610_adc.c
@@ -259,7 +259,6 @@ static void vf610_adc_cfg_post_set(struct vf610_adc *info)
 static void vf610_adc_calibration(struct vf610_adc *info)
 {
 	int adc_gc, hc_cfg;
-	int timeout;
 
 	if (!info->adc_feature.calibration)
 		return;
@@ -271,9 +270,7 @@ static void vf610_adc_calibration(struct vf610_adc *info)
 	adc_gc = readl(info->regs + VF610_REG_ADC_GC);
 	writel(adc_gc | VF610_ADC_CAL, info->regs + VF610_REG_ADC_GC);
 
-	timeout = wait_for_completion_timeout
-			(&info->completion, VF610_ADC_TIMEOUT);
-	if (timeout == 0)
+	if (!wait_for_completion_timeout(&info->completion, VF610_ADC_TIMEOUT))
 		dev_err(info->dev, "Timeout for adc calibration\n");
 
 	adc_gc = readl(info->regs + VF610_REG_ADC_GS);