Skip to content
Commit 7169f122 authored by Meng Li's avatar Meng Li Committed by Liwei Song
Browse files

driver: adc: ltc2497: return directly after reading the adc conversion value

commit 1209195e from
git://git.yoctoproject.org/linux-yocto

 v5.10/standard/intel-sdk-5.10/intel-socfpga.

When read adc conversion value with below command:
cat /sys/.../iio:device0/in_voltage0-voltage1_raw
There is an error reported as below:
ltc2497 0-0014: i2c transfer failed: -EREMOTEIO
This i2c transfer issue is introduced by commit 69548b7c ("iio:
adc: ltc2497: split protocol independent part in a separate module").
When extract the common code into ltc2497-core.c, it change the
code logic of function ltc2497core_read(). With wrong reading
sequence, the action of enable adc channel is sent to chip again
during adc channel is in conversion status. In this way, there is
no ack from chip, and then cause i2c transfer failed.
In order to keep the code logic is the same with original ideal,
it is need to return direct after reading the adc conversion value.

Fixes: 69548b7c ("iio: adc: ltc2497: split protocol independent part in a separate module ")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMeng Li <Meng.Li@windriver.com>
Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: default avatarLiwei Song <liwei.song@windriver.com>
parent f39f7810
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment