]> git.ipfire.org Git - thirdparty/kernel/stable.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>
Mon, 24 Oct 2022 07:56:41 +0000 (09:56 +0200)
commit81c68fb490e284ca91388f66f08e0b25e905b3d1
tree67d8a4db99aafb3a2b3f36f245dfc71afc13aa91
parent943eb0ede74ecd609fdfd3f0b83e0d237613e526
iio: dac: ad5593r: Fix i2c read protocol requirements

commit 558a25f903b4af6361b7fbeea08a6446a0745653 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: 56ca9db862bf ("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