]> 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:23:37 +0000 (18:23 -0700)
commitddce032df6a9236f3a59dacce9ee529487667fdb
tree739af4854915d955bab4308224a289104119499a
parent4d8cd5e768d3f806d31364dc480b80272a4eb4d4
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