summaryrefslogtreecommitdiff
path: root/drivers/iio/chemical
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-11 09:25:01 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-11 09:25:01 +0100
commit3b6effbc3805a4fd282549d6283f115c47b12a7e (patch)
treed7c7f818ffa5797c648ce3ea8b985b515e9ff816 /drivers/iio/chemical
parentc2f4dd4364b71ef4eb43925b402377aefe9c1ca0 (diff)
parentd13937116f1e82bf508a6325111b322c30c85eb9 (diff)
Merge 5.0-rc6 into staging-next
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/chemical')
-rw-r--r--drivers/iio/chemical/atlas-ph-sensor.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c
index a406ad31b096..3a20cb5d9bff 100644
--- a/drivers/iio/chemical/atlas-ph-sensor.c
+++ b/drivers/iio/chemical/atlas-ph-sensor.c
@@ -444,9 +444,8 @@ static int atlas_read_raw(struct iio_dev *indio_dev,
case IIO_CHAN_INFO_SCALE:
switch (chan->type) {
case IIO_TEMP:
- *val = 1; /* 0.01 */
- *val2 = 100;
- break;
+ *val = 10;
+ return IIO_VAL_INT;
case IIO_PH:
*val = 1; /* 0.001 */
*val2 = 1000;
@@ -477,7 +476,7 @@ static int atlas_write_raw(struct iio_dev *indio_dev,
int val, int val2, long mask)
{
struct atlas_data *data = iio_priv(indio_dev);
- __be32 reg = cpu_to_be32(val);
+ __be32 reg = cpu_to_be32(val / 10);
if (val2 != 0 || val < 0 || val > 20000)
return -EINVAL;