]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adc: ti_am335x_adc: Increase timeout value waiting for ADC sample
authorVignesh R <vigneshr@ti.com>
Wed, 17 Aug 2016 12:13:01 +0000 (17:43 +0530)
committerJonathan Cameron <jic23@kernel.org>
Sun, 21 Aug 2016 18:48:31 +0000 (19:48 +0100)
commit6b4fc96458c34141a4a844362b0b4c6f45dd3df6
tree1943c8cf16ab4075753629fe273aba2ee51bba96
parentb4e6b87d58875dfc4e842dd20671ac134030cf9a
iio: adc: ti_am335x_adc: Increase timeout value waiting for ADC sample

Now that open delay and sample delay for each channel is configurable
via DT, the default IDLE_TIMEOUT value is not enough as this is
calculated based on hardcoded macros. This results in driver returning
EBUSY sometimes. Fix this by increasing the timeout
value based on maximum value possible to open delay and sample delays
for each channel.

Fixes: ce208c26c8980 ("iio: adc: ti_am335x_adc: make sample delay, open delay, averaging DT parameters")
Signed-off-by: Vignesh R <vigneshr@ti.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/ti_am335x_adc.c
include/linux/mfd/ti_am335x_tscadc.h