提交 f825ebe5 编写于 作者: L Lee Jones

mfd: ab8500-gpadc: Reduce conversion timeout

Reduce the conversion timeout from 2s to 0.5s
Signed-off-by: NLee Jones <lee.jones@linaro.org>
Signed-off-by: NJonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: NKarl KOMIEROWSKI <karl.komierowski@stericsson.com>
上级 70bad04f
...@@ -86,6 +86,8 @@ ...@@ -86,6 +86,8 @@
/* Time in ms before disabling regulator */ /* Time in ms before disabling regulator */
#define GPADC_AUDOSUSPEND_DELAY 1 #define GPADC_AUDOSUSPEND_DELAY 1
#define CONVERSION_TIME 500 /* ms */
enum cal_channels { enum cal_channels {
ADC_INPUT_VMAIN = 0, ADC_INPUT_VMAIN = 0,
ADC_INPUT_BTEMP, ADC_INPUT_BTEMP,
...@@ -372,7 +374,8 @@ int ab8500_gpadc_read_raw(struct ab8500_gpadc *gpadc, u8 channel) ...@@ -372,7 +374,8 @@ int ab8500_gpadc_read_raw(struct ab8500_gpadc *gpadc, u8 channel)
goto out; goto out;
} }
/* wait for completion of conversion */ /* wait for completion of conversion */
if (!wait_for_completion_timeout(&gpadc->ab8500_gpadc_complete, 2*HZ)) { if (!wait_for_completion_timeout(&gpadc->ab8500_gpadc_complete,
msecs_to_jiffies(CONVERSION_TIME))) {
dev_err(gpadc->dev, dev_err(gpadc->dev,
"timeout: didn't receive GPADC conversion interrupt\n"); "timeout: didn't receive GPADC conversion interrupt\n");
ret = -EINVAL; ret = -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册