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>
 /* Time in ms before disabling regulator */
 #define GPADC_AUDOSUSPEND_DELAY                1
 
+#define CONVERSION_TIME                        500 /* ms */
+
 enum cal_channels {
        ADC_INPUT_VMAIN = 0,
        ADC_INPUT_BTEMP,
                goto out;
        }
        /* 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,
                        "timeout: didn't receive GPADC conversion interrupt\n");
                ret = -EINVAL;