]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit2e4b6eea7a021aa6a4c731adbf1a4994dfc8c0ed
treefebdee95cce25ad92f0fae440d662ae2144c5d65
parent43e7c410e9cbcedc0da57e80bd4e7cf37b38e83a
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