浏览代码

iio: hdc100x: correct IIO_CHAN_INFO_OFFSET value

Previous offset wasn't applied in the correct order and invalid.
This patchset fixes this issue, and also has the correct scale value
applied to the offset.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Matt Ranostay 10 年之前
父节点
当前提交
d3a21ce0c6
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      drivers/iio/humidity/hdc100x.c

+ 3 - 2
drivers/iio/humidity/hdc100x.c

@@ -221,8 +221,9 @@ static int hdc100x_read_raw(struct iio_dev *indio_dev,
 		}
 		break;
 	case IIO_CHAN_INFO_OFFSET:
-		*val = -40;
-		return IIO_VAL_INT;
+		*val = -3971;
+		*val2 = 879096;
+		return IIO_VAL_INT_PLUS_MICRO;
 	default:
 		return -EINVAL;
 	}