iio: chemical: vz89x hardware i2c workaround
authorMatt Ranostay <mranostay@gmail.com>
Wed, 23 Sep 2015 04:25:09 +0000 (21:25 -0700)
committerJonathan Cameron <jic23@kernel.org>
Wed, 30 Sep 2015 17:20:53 +0000 (18:20 +0100)
commitbf23cee62d5953927758ff6287d300dc945afc84
treefebdee95cce25ad92f0fae440d662ae2144c5d65
parent83234554ef3a9549d83d08c9aafbe041c75d3a89
iio: chemical: vz89x hardware i2c workaround

Chipset sometime updates in the middle of a reading causing it
to reset the data pointer, and causing invalid reading of previous data.

We can check for this invalid state by reading MSB of the resistance
reading that is always zero, and by also confirming the VOC_short isn't
zero.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/chemical/vz89x.c