]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (ads7828) Enable internal reference
authorAkshay Bhat <akshay.bhat@timesys.com>
Mon, 18 Apr 2016 19:47:53 +0000 (15:47 -0400)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 19 Apr 2016 13:30:28 +0000 (06:30 -0700)
commit725e6e4e6e5eff35bb495007255fbb1fa2cd0a93
treea6b39b60800292c14a9732f0cd6b0837d5e5c951
parent4358ad30b78a3e000ac991e7bd80536e53e71f4e
hwmon: (ads7828) Enable internal reference

On ads7828 the internal reference defaults to off upon power up. When
using internal reference, it needs to be turned on and the voltage needs
to settle before normal conversion cycle can be started. Hence perform a
dummy read in the probe to enable the internal reference allowing the
voltage to settle before performing a normal read.

Without this fix, the first read from the ADC when using internal
reference always returns incorrect data.

Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
Cc: stable@vger.kernel.org # v4.1+
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ads7828.c