]> git.ipfire.org Git - thirdparty/kernel/stable.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:18:49 +0000 (18:18 -0700)
commit6bff15be8869b45e3bd6f4b8d4d60ebd08a1365a
tree2eeeb5ba4fb991698e753fcc42e129b5f31ee43b
parentadf82e8ee519df413deec3334021de502c82f17a
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