summaryrefslogtreecommitdiffstats
path: root/tools/iio
diff options
context:
space:
mode:
authorAlison Schofield2016-08-08 20:14:36 +0200
committerJonathan Cameron2016-08-15 18:01:53 +0200
commit0d9dcf852334b796bacc7020364afba3122db81e (patch)
tree50f92a193082137339b924d676025a3d454a7be5 /tools/iio
parentiio: pressure: bmp280: fix runtime suspend/resume crash (diff)
downloadkernel-qcow2-linux-0d9dcf852334b796bacc7020364afba3122db81e.tar.gz
kernel-qcow2-linux-0d9dcf852334b796bacc7020364afba3122db81e.tar.xz
kernel-qcow2-linux-0d9dcf852334b796bacc7020364afba3122db81e.zip
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>
Diffstat (limited to 'tools/iio')
0 files changed, 0 insertions, 0 deletions