“405bbe9fa345050f46c411d77727f381d74a2ba8”上不存在“drivers/net/ethernet/dec/tulip/winbond-840.c”
提交 d89cc5aa 编写于 作者: J Jonas Aaberg 提交者: Lee Jones

mfd: ab8500-gpadc: Reread on failure

Reread the gpadc once upon failure.
Signed-off-by: NJonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
Reviewed-by: NMattias WALLIN <mattias.wallin@stericsson.com>
Acked-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 774c50ab
......@@ -256,6 +256,11 @@ int ab8500_gpadc_convert(struct ab8500_gpadc *gpadc, u8 channel)
int voltage;
ad_value = ab8500_gpadc_read_raw(gpadc, channel);
/* On failure retry a second time */
if (ad_value < 0)
ad_value = ab8500_gpadc_read_raw(gpadc, channel);
if (ad_value < 0) {
dev_err(gpadc->dev, "GPADC raw value failed ch: %d\n", channel);
return ad_value;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册