Commit graph

2 commits

Author SHA1 Message Date
Arnd Bergmann 0708677558 iio: adc/imx25-gcq: Move incorrect do_div
The newly added driver uses do_div() to device a 32-bit number, which now
provokes a warning:

drivers/iio/adc/fsl-imx25-gcq.c: In function 'mx25_gcq_setup_cfgs':
include/asm-generic/div64.h:207:28: warning: comparison of distinct pointer types lacks a cast
  (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \

This replaces the do_div() call with a straight division operator.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 6df2e98c3e ("iio: adc: Add imx25-gcq ADC driver")
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-03-09 12:50:51 +07:00
Markus Pargmann 6df2e98c3e iio: adc: Add imx25-gcq ADC driver
This is a conversion queue driver for the mx25 SoC. It uses the central
ADC which is used by two seperate independent queues. This driver
prepares different conversion configurations for each possible input.
For a conversion it creates a conversionqueue of one item with the
correct configuration for the chosen channel. It then executes the queue
once and disables the conversion queue afterwards.

The reference voltages are configurable through devicetree subnodes,
depending on the connections of the ADC inputs.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Denis Carikli <denis@eukrea.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-02-11 15:40:41 +00:00