Commit 23e0618c authored by Christian Eggers's avatar Christian Eggers Committed by Jonathan Cameron

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: default avatarChristian Eggers <ceggers@arri.de>
Link: https://lore.kernel.org/r/20200909154439.10308-1-ceggers@arri.de
Fixes: 403e5586 ("iio: light: as73211: New driver")
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent dde8ceec
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment