iio: mxs-lradc: fix divider
authorRobert Hodaszi <robert.hodaszi@digi.com>
Mon, 6 Oct 2014 13:41:00 +0000 (14:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jun 2014 19:15:42 +0000 (15:15 -0400)
commita7527d068f2c3cd06c41c8ec1021c2c3214f067e
tree341d556366f45917c9bef69035575397cdb8e97f
parentf7519c94637e800a5e80f76653bb228e1c75bf0e
iio: mxs-lradc: fix divider

commit 19bc4981a213d0c5b0e1e8b08815c0b26f01ec54 upstream.

All channels' single measurement are happening on CH 0. So enabling / disabling
the divider once is not enough, because it has impact on all channels.

Set only a flag, then check this on each measurement, and enable / disable the
divider as required.

Signed-off-by: Robert Hodaszi <robert.hodaszi@digi.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/adc/mxs-lradc.c