CHROMIUM: ARM: exynos: Check for adc errors in thermistor read
authorDoug Anderson <dianders@chromium.org>
Thu, 20 Sep 2012 04:01:38 +0000 (21:01 -0700)
committerGerrit <chrome-bot@google.com>
Thu, 20 Sep 2012 18:39:48 +0000 (11:39 -0700)
commitaf52764256ee2198ee5b3b3743c2baea997db0ce
treeb6295beb9c7929ca9593ad07e0dd731c7283f31d
parentdbc8bf9ea7f11110c401d0432812cb6627f52feb
CHROMIUM: ARM: exynos: Check for adc errors in thermistor read

s3c_adc_read() can return an error value; check for it and pass
it back.  Also add a warning.

BUG=chrome-os-partner:13853
TEST=Put a bogus timeout return in s3c_adc_read() and then
  cat /sys/devices/platform/ncp15wb473.0/temp1_input
...you'll see this:
  cat: /sys/devices/platform/ncp15wb473.0/temp1_input: Connection timed out
...and you'll see a negative value and a warning in the log:
  [   28.347414] ntc-thermistor ncp15wb473.0: Thermistor read err: 0xffffff92

Change-Id: Ibe04ac25fca5d66284492075af47d11d55e66e80
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33674
Reviewed-by: Vikas Sajjan <vikas.sajjan@samsung.com>
Reviewed-by: Abhinav Kochhar <abhinav@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
arch/arm/mach-exynos/mach-exynos5-dt.c