diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-01-28 04:20:45 -0500 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2013-02-04 03:33:27 -0500 |
commit | f825ebe522e974fec84525f12a43ec70e304e248 (patch) | |
tree | 34044695116a51e3ba5565659e0c70d8ee839633 /drivers/mfd | |
parent | 70bad04f2a30be002d8f4701d98d14259a86391b (diff) |
mfd: ab8500-gpadc: Reduce conversion timeout
Reduce the conversion timeout from 2s to 0.5s
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/ab8500-gpadc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c index 580f1008d67a..44fa224a443e 100644 --- a/drivers/mfd/ab8500-gpadc.c +++ b/drivers/mfd/ab8500-gpadc.c | |||
@@ -86,6 +86,8 @@ | |||
86 | /* Time in ms before disabling regulator */ | 86 | /* Time in ms before disabling regulator */ |
87 | #define GPADC_AUDOSUSPEND_DELAY 1 | 87 | #define GPADC_AUDOSUSPEND_DELAY 1 |
88 | 88 | ||
89 | #define CONVERSION_TIME 500 /* ms */ | ||
90 | |||
89 | enum cal_channels { | 91 | enum cal_channels { |
90 | ADC_INPUT_VMAIN = 0, | 92 | ADC_INPUT_VMAIN = 0, |
91 | ADC_INPUT_BTEMP, | 93 | ADC_INPUT_BTEMP, |
@@ -372,7 +374,8 @@ int ab8500_gpadc_read_raw(struct ab8500_gpadc *gpadc, u8 channel) | |||
372 | goto out; | 374 | goto out; |
373 | } | 375 | } |
374 | /* wait for completion of conversion */ | 376 | /* wait for completion of conversion */ |
375 | if (!wait_for_completion_timeout(&gpadc->ab8500_gpadc_complete, 2*HZ)) { | 377 | if (!wait_for_completion_timeout(&gpadc->ab8500_gpadc_complete, |
378 | msecs_to_jiffies(CONVERSION_TIME))) { | ||
376 | dev_err(gpadc->dev, | 379 | dev_err(gpadc->dev, |
377 | "timeout: didn't receive GPADC conversion interrupt\n"); | 380 | "timeout: didn't receive GPADC conversion interrupt\n"); |
378 | ret = -EINVAL; | 381 | ret = -EINVAL; |