From: SeungJu Cheon <suunj1331@gmail.com>
To: antoniu.miclaus@analog.com, lars@metafoo.de,
Michael.Hennerich@analog.com, jic23@kernel.org
Cc: andriy.shevchenko@intel.com, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, SeungJu Cheon <suunj1331@gmail.com>
Subject: [PATCH v2] iio:frequency:adf4377: Fix duplicated soft reset mask
Date: Tue, 30 Dec 2025 22:21:26 +0900 [thread overview]
Message-ID: <20251230132126.217802-1-suunj1331@gmail.com> (raw)
In-Reply-To: <20251230123609.210454-1-suunj1331@gmail.com>
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 incomplete reset status check.
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>
---
drivers/iio/frequency/adf4377.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/frequency/adf4377.c b/drivers/iio/frequency/adf4377.c
index 08833b7035e4..48aa4b015a14 100644
--- a/drivers/iio/frequency/adf4377.c
+++ b/drivers/iio/frequency/adf4377.c
@@ -501,7 +501,7 @@ static int adf4377_soft_reset(struct adf4377_state *st)
return ret;
return regmap_read_poll_timeout(st->regmap, 0x0, read_val,
- !(read_val & (ADF4377_0000_SOFT_RESET_R_MSK |
+ !(read_val & (ADF4377_0000_SOFT_RESET_MSK |
ADF4377_0000_SOFT_RESET_R_MSK)), 200, 200 * 100);
}
--
2.52.0
next prev parent reply other threads:[~2025-12-30 13:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-30 12:36 [PATCH] iio:frequency:adf4377: Fix duplicated soft reset mask SeungJu Cheon
2025-12-30 12:57 ` Andy Shevchenko
2025-12-30 13:21 ` SeungJu Cheon [this message]
2025-12-31 11:19 ` [PATCH v2] " Andy Shevchenko
2026-01-11 12:09 ` Jonathan Cameron
2026-01-23 9:44 ` Jonathan Cameron
2026-01-23 10:08 ` Miclaus, Antoniu
2026-01-23 11:06 ` andriy.shevchenko
-- strict thread matches above, loose matches on Subject: below --
2026-01-23 11:56 SeungJu Cheon
2026-01-23 14:35 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251230132126.217802-1-suunj1331@gmail.com \
--to=suunj1331@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox