]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
iio: adc: ad_sigma_delta: Handle CS assertion as intended in ad_sd_read_reg_raw()
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Fri, 6 Dec 2024 17:28:37 +0000 (18:28 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 11 Dec 2024 19:20:48 +0000 (19:20 +0000)
When struct ad_sigma_delta::keep_cs_asserted was introduced only
register writing was adapted to honor this new flag. Also respect it
when reading a register.

Fixes: df1d80aee963 ("iio: ad_sigma_delta: Properly handle SPI bus locking vs CS assertion")
Reviewed-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/8d76b4ea4a4363b269886c71193b840821c724ea.1733504533.git.u.kleine-koenig@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad_sigma_delta.c

index 8fe2ed8b30f9d3f5f44e0b92f2ad499645714cb0..65608dc2bfecae1083e8bd11394b89b51d811c1a 100644 (file)
@@ -109,7 +109,7 @@ static int ad_sd_read_reg_raw(struct ad_sigma_delta *sigma_delta,
                }, {
                        .rx_buf = val,
                        .len = size,
-                       .cs_change = sigma_delta->bus_locked,
+                       .cs_change = sigma_delta->keep_cs_asserted,
                },
        };
        struct spi_message m;