]> git.baikalelectronics.ru Git - kernel.git/commit
iio: dac: ad5593r: Fix i2c read protocol requirements
authorMichael Hennerich <michael.hennerich@analog.com>
Tue, 13 Sep 2022 07:34:12 +0000 (09:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:12 +0000 (13:22 +0200)
commite95ef4c36c5d243f15eac9c75ea0a702999c7f1a
tree4f5bdcb438195898f8c962cde6228d2c790ab84f
parent9130c079a77bf039b399cb72344e668baa527115
iio: dac: ad5593r: Fix i2c read protocol requirements

commit 02ce6cbadec34b62d2fa067861f254f0e7a1cd04 upstream.

For reliable operation across the full range of supported
interface rates, the AD5593R needs a STOP condition between
address write, and data read (like show in the datasheet Figure 40)
so in turn i2c_smbus_read_word_swapped cannot be used.

While at it, a simple helper was added to make the code simpler.

Fixes: 733f78612889 ("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs")
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Cc: <Stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220913073413.140475-2-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/dac/ad5593r.c