]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (ads7828) Enable internal reference
authorAkshay Bhat <akshay.bhat@timesys.com>
Mon, 18 Apr 2016 19:47:53 +0000 (15:47 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jun 2016 01:14:34 +0000 (18:14 -0700)
commitb8562066d4819ee23d3f8da2fa5e9160bf854835
tree9f1ffdb09fe6b14017da00a7a815d99ec5aae258
parent9a11bd2d14ad54e92170cdc9c2e2f278305929c1
hwmon: (ads7828) Enable internal reference

commit 7a18afe8097731b8ffb6cb5b2b3b418ded77c105 upstream.

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>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/ads7828.c