From: Christian Eggers Date: Wed, 9 Sep 2020 15:44:39 +0000 (+0200) Subject: iio: light: as73211: Increase measurement timeout X-Git-Tag: v5.10.7~1420^2~64^2~120 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23e0618ca0255d12798acd3ae37fd98d0def7070;p=platform%2Fkernel%2Flinux-rpi.git 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 Link: https://lore.kernel.org/r/20200909154439.10308-1-ceggers@arri.de Fixes: 403e5586b52e ("iio: light: as73211: New driver") Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/light/as73211.c b/drivers/iio/light/as73211.c index b1178df..7b32dfa 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) {