aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>2024-12-06 18:28:37 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-12-11 19:20:48 +0000
commit90b8b2fe60eb673d917b3c11abfc0a8ee144145e (patch)
tree7c059fbc10adf6f4ef03f4baf48530feb962f5e4
parentiio: adc: ad_sigma_delta: Add support for reading irq status using a GPIO (diff)
downloadwireguard-linux-90b8b2fe60eb673d917b3c11abfc0a8ee144145e.tar.xz
wireguard-linux-90b8b2fe60eb673d917b3c11abfc0a8ee144145e.zip
iio: adc: ad_sigma_delta: Handle CS assertion as intended in ad_sd_read_reg_raw()
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>
-rw-r--r--drivers/iio/adc/ad_sigma_delta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
index 8fe2ed8b30f9..65608dc2bfec 100644
--- a/drivers/iio/adc/ad_sigma_delta.c
+++ b/drivers/iio/adc/ad_sigma_delta.c
@@ -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;