summaryrefslogtreecommitdiffstats
path: root/drivers/iio/humidity
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-11-18 13:15:50 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-11-18 13:15:50 -0800
commit819db468b26797d9f53d547dd2a9fe94859a16e0 (patch)
tree477939a68fc7976e24b1f0788fb754a9d43f5013 /drivers/iio/humidity
parent8005c49d9aea74d382f474ce11afbbc7d7130bec (diff)
parenta57f8dac46fbac5ab0e31aef1a98b3f6eb30c079 (diff)
downloadop-kernel-dev-819db468b26797d9f53d547dd2a9fe94859a16e0.zip
op-kernel-dev-819db468b26797d9f53d547dd2a9fe94859a16e0.tar.gz
Merge tag 'iio-fixes-for-4.4a' of ssh://ra.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes: First set of IIO fixes for the 4.4 cycle. This set does not include those for issues introduced during the merge window. Fixes of those will follow in a future series. * ad5064 - Make sure the local i2c_write returns 0 on success rather than the number of bytes transfered. Otherwise we report an error on all writes. - Fix a shift for ad5629 and ad5669 which gives incorrect DAC output on these parts. * ad7793 - The product ID on the datasheet is wrong. Fix it in the driver. * IIO_DUMMY_EVGEN - select IRQ_WORK as a dependency. * lpc32xx - make sure clock is prepared before enabling. * si7020 - data byte order was reversed. Fix it. * vf610 - Internal temperature calculation was wrong if a different reference voltage was used. Now use a linear interpolation function to make it work over the full range. - Fix a division by zero in the case of a device tree property not being present (same issue two fixes). * xilinx XADC - VREFN scale was wrong - fix it.
Diffstat (limited to 'drivers/iio/humidity')
-rw-r--r--drivers/iio/humidity/si7020.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/humidity/si7020.c b/drivers/iio/humidity/si7020.c
index 12128d1..71991b5 100644
--- a/drivers/iio/humidity/si7020.c
+++ b/drivers/iio/humidity/si7020.c
@@ -50,10 +50,10 @@ static int si7020_read_raw(struct iio_dev *indio_dev,
switch (mask) {
case IIO_CHAN_INFO_RAW:
- ret = i2c_smbus_read_word_data(*client,
- chan->type == IIO_TEMP ?
- SI7020CMD_TEMP_HOLD :
- SI7020CMD_RH_HOLD);
+ ret = i2c_smbus_read_word_swapped(*client,
+ chan->type == IIO_TEMP ?
+ SI7020CMD_TEMP_HOLD :
+ SI7020CMD_RH_HOLD);
if (ret < 0)
return ret;
*val = ret >> 2;
OpenPOWER on IntegriCloud