@@ -1171,7 +1171,7 @@ static int bu27034_read_raw(struct iio_dev *idev,
if (*val < 0)
return *val;
- return IIO_VAL_INT;
+ return IIO_VAL_INT_MICRO;
case IIO_CHAN_INFO_SCALE:
return bu27034_get_scale(data, chan->channel, val, val2);
@@ -1229,7 +1229,10 @@ static int bu27034_write_raw(struct iio_dev *idev,
ret = bu27034_set_scale(data, chan->channel, val, val2);
break;
case IIO_CHAN_INFO_INT_TIME:
- ret = bu27034_try_set_int_time(data, val);
+ if (val)
+ return -EINVAL;
+
+ ret = bu27034_try_set_int_time(data, val2);
break;
default:
ret = -EINVAL;
The integration time was presented by BU27034 in micro seconds. The ABI documentation says this should be in seconds. Fix integration time to be in seconds. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> --- drivers/iio/light/rohm-bu27034.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)