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: ff06b39be1 ("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>
This commit is contained in:
Marcelo Schmitt 2026-09-16 14:01:34 -03:00 committed by Jonathan Cameron
parent c5de6a6f85
commit 9ec6ecc95d

View File

@ -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,