]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: ad7793: Fix the serial interface reset
authorDragos Bogdan <dragos.bogdan@analog.com>
Tue, 5 Sep 2017 12:16:13 +0000 (15:16 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2017 09:56:12 +0000 (11:56 +0200)
commitdf1ff9f352edc10e29ce8fbea49fa7fa05f247ca
treeef7ac8703983c32cfdbb17410f2ff6c36e1c0312
parent2fbaf4bc9da3af4e15a68cb0b35a1d95667bdb4d
iio: ad7793: Fix the serial interface reset

commit 7ee3b7ebcb74714df6d94c8f500f307e1ee5dda5 upstream.

The serial interface can be reset by writing 32 consecutive 1s to the device.
'ret' was initialized correctly but its value was overwritten when
ad7793_check_platform_data() was called. Since a dedicated reset function
is present now, it should be used instead.

Fixes: 2edb769d246e ("iio:ad7793: Add support for the ad7798 and ad7799")
Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/ad7793.c