From: Alexandre Belloni Date: Fri, 6 Dec 2013 19:31:00 +0000 (+0000) Subject: iio: mxs-lradc: compute temperature from channel 8 and 9 X-Git-Tag: v3.14-rc1~150^2~163^2~23 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8231a9af8147f8a401fc55931ec44abfb937660;p=pandora-kernel.git iio: mxs-lradc: compute temperature from channel 8 and 9 The mxs LRADC is able to read an internal die temperature sensor. The temperature has to be calculated from the value read on channel 8 and channel 9. To be able to expose the result to hwmon, implement iio channel 8 as (channel 9 - channel 8). Then, implement IIO_CHAN_INFO_SCALE and IIO_CHAN_INFO_OFFSET so that it can be processed by hwmon through the in kernel provider/consumer mechanism. Signed-off-by: Alexandre Belloni Signed-off-by: Maxime Ripard Reviewed-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed