]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: frequency: adf4377: Fix duplicated soft reset mask
authorSeungJu Cheon <suunj1331@gmail.com>
Fri, 23 Jan 2026 19:47:58 +0000 (04:47 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Mar 2026 15:15:29 +0000 (16:15 +0100)
commitc0c28cb192665fd0ff54920e46528a02ef4cb166
tree044ef896b0a139b5bf4b8cc0818300229b6bc089
parent8d6a232f918eac3b5dd05481f9902c1d8f4d5204
iio: frequency: adf4377: Fix duplicated soft reset mask

commit 6c8bf4b604a8a6346ca71f1c027fa01c2c2e04cb upstream.

The regmap_read_poll_timeout() uses ADF4377_0000_SOFT_RESET_R_MSK
twice instead of checking both SOFT_RESET_MSK (bit 0) and
SOFT_RESET_R_MSK (bit 7). This causes an incomplete reset status check.

The code first sets both SOFT_RESET and SOFT_RESET_R bits to 1 via
regmap_update_bits(), then polls for them to be cleared. Since we set
both bits before polling, we should be waiting for both to clear.

Fix by using both masks as done in regmap_update_bits() above.

Fixes: eda549e2e524 ("iio: frequency: adf4377: add support for ADF4377")
Signed-off-by: SeungJu Cheon <suunj1331@gmail.com>
Cc: Stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/frequency/adf4377.c