diff options
author | Christian Eggers <ceggers@arri.de> | 2020-09-09 18:44:39 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-09-13 12:37:46 +0300 |
commit | 23e0618ca0255d12798acd3ae37fd98d0def7070 (patch) | |
tree | 5f73ae414813818ae2286e40d361648a10fd325f | |
parent | dde8ceec9e29fe2abf4fabee7d5a0445d0b75b66 (diff) | |
download | linux-23e0618ca0255d12798acd3ae37fd98d0def7070.tar.xz |
iio: light: as73211: Increase measurement timeout
We found some sensors which are much slower (20% at room temperature)
than nominal. According to the data sheet, up to 27% is possible. Now I
add 33% to the nominal time out, hopefully this is enough.
Signed-off-by: Christian Eggers <ceggers@arri.de>
Link: https://lore.kernel.org/r/20200909154439.10308-1-ceggers@arri.de
Fixes: 403e5586b52e ("iio: light: as73211: New driver")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r-- | drivers/iio/light/as73211.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iio/light/as73211.c b/drivers/iio/light/as73211.c index b1178dfc1f65..7b32dfaee9b3 100644 --- a/drivers/iio/light/as73211.c +++ b/drivers/iio/light/as73211.c @@ -259,10 +259,9 @@ static int as73211_req_data(struct as73211_data *data) data->osr &= ~AS73211_OSR_SS; /* - * Add some extra margin for the timeout. sensor timing is not as precise - * as our one ... + * Add 33% extra margin for the timeout. fclk,min = fclk,typ - 27%. */ - time_us += time_us / 8; + time_us += time_us / 3; if (data->client->irq) { ret = wait_for_completion_timeout(&data->completion, usecs_to_jiffies(time_us)); if (!ret) { |