linux/drivers/iio/humidity
Alison Schofield 0d9dcf8523 iio: humidity: hdc100x: fix sensor data reads of temp and humidity
Replace the i2c_smbus_read_byte commmands used to retrieve the sensor
data with an i2c_master_recv command.

The smbus read byte method fails because the device does not expect a
stop condition after sending the first byte. When we issue the second
read, we are getting the first byte again. Net effect is that of the 14
bits used for the measurement, the 8 most significant bits are correct,
the lower 6 are not.

None of the smbus read protocols follow the pattern this device requires
(S Addr Rd [A] Data [A] Data NA P), hence the switch to an i2c receive
transaction.

Applicable from original introduction of this driver, but will require
backporting due to churn in the code.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-15 17:01:53 +01:00
..
Kconfig iio: add Kconfig selects needed for triggered buffer compiles 2016-08-15 15:42:04 +01:00
Makefile iio: humidity: Add support for AM2315 2016-04-24 09:56:07 +01:00
am2315.c iio: humidity: am2315: set up buffer timestamps for non-zero values 2016-08-15 15:39:23 +01:00
dht11.c iio: dht11: Improve logging 2016-04-10 17:40:06 +01:00
hdc100x.c iio: humidity: hdc100x: fix sensor data reads of temp and humidity 2016-08-15 17:01:53 +01:00
htu21.c iio: Export I2C module alias information 2016-05-21 20:08:14 +01:00
si7005.c iio: convert to common i2c_check_functionality() return value 2016-02-27 17:17:43 +00:00
si7020.c iio: convert to common i2c_check_functionality() return value 2016-02-27 17:17:43 +00:00