summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Schmitt <marcelo.schmitt@analog.com>2026-09-16 14:01:34 -0300
committerJonathan Cameron <jonathan.cameron@oss.qualcomm.com>2026-09-30 18:59:55 +0100
commit9ec6ecc95dda6d91fa6f671cd972dd4bfc05ba38 (patch)
tree18d583d3e30c55873a35e155bbb3b167abb6c177
parentc5de6a6f855fdcf1e0ea549fb227a316db51c405 (diff)
downloadlinux-stable-9ec6ecc95dda6d91fa6f671cd972dd4bfc05ba38.tar.gz
linux-stable-9ec6ecc95dda6d91fa6f671cd972dd4bfc05ba38.zip
iio: adc: ad7173: Fix digital filter configuration
Filter enable and filter type selection masks were swapped on data preparation for filter configuration register write. Use the correct masks to set each property of post filter configuration. Fixes: ff06b39be1a1 ("iio: adc: ad7173: support changing filter type") Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com> Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
-rw-r--r--drivers/iio/adc/ad7173.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c
index eb47175a0..faebb7b34 100644
--- a/drivers/iio/adc/ad7173.c
+++ b/drivers/iio/adc/ad7173.c
@@ -775,9 +775,9 @@ static int ad7173_load_config(struct ad7173_state *st,
return ad_sd_write_reg(&st->sd, AD7173_REG_FILTER(free_cfg_slot), 2,
FIELD_PREP(AD7173_FILTER_SINC3_MAP, 0) |
- FIELD_PREP(AD7173_FILTER_ENHFILT_MASK,
- post_filter_enable) |
FIELD_PREP(AD7173_FILTER_ENHFILTEN,
+ post_filter_enable) |
+ FIELD_PREP(AD7173_FILTER_ENHFILT_MASK,
post_filter_select) |
FIELD_PREP(AD7173_FILTER_ORDER, 0) |
FIELD_PREP(AD7173_FILTER_ODR_MASK,