iio: mxs-lradc: add scale attribute to channels
authorHector Palacios <hector.palacios@digi.com>
Mon, 23 Dec 2013 17:48:00 +0000 (17:48 +0000)
committerJonathan Cameron <jic23@kernel.org>
Wed, 1 Jan 2014 14:16:43 +0000 (14:16 +0000)
commitf6db68a405c795481e15c6c34c865f511b2a098e
treee51d043b498b48913a03453049c25d4a00eedf41
parent971672c0b3ccd16ce53299f1ccac0253fc6d7bf6
iio: mxs-lradc: add scale attribute to channels

Some LRADC channels have fixed pre-dividers and all have an optional
divider by two which allows a maximum input voltage of VDDIO - 50mV.

This patch
 - adds the scaling info flag to all channels
 - grabs the max reference voltage per channel
   (where the fixed pre-dividers apply)
 - allows to read the scaling attribute (computed from the Vref)

Signed-off-by: Hector Palacios <hector.palacios@digi.com>.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/mxs-lradc.c