Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f825ebe5 authored by Lee Jones's avatar Lee Jones
Browse files

mfd: ab8500-gpadc: Reduce conversion timeout



Reduce the conversion timeout from 2s to 0.5s

Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarJonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: default avatarKarl KOMIEROWSKI <karl.komierowski@stericsson.com>
parent 70bad04f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -86,6 +86,8 @@
/* 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,
@@ -372,7 +374,8 @@ int ab8500_gpadc_read_raw(struct ab8500_gpadc *gpadc, u8 channel)
		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;