public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] iio:frequency:adf4377: Fix duplicated soft reset mask
@ 2026-01-23 11:56 SeungJu Cheon
  2026-01-23 14:35 ` Andy Shevchenko
  0 siblings, 1 reply; 8+ messages in thread
From: SeungJu Cheon @ 2026-01-23 11:56 UTC (permalink / raw)
  To: antoniu.miclaus, lars, Michael.Hennerich, jic23
  Cc: andriy.shevchenko, dlechner, nuno.sa, andy, linux-iio,
	linux-kernel, SeungJu Cheon

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.

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>
---
v2:
 - Add Fixes tag

 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] iio:frequency:adf4377: Fix duplicated soft reset mask
@ 2025-12-30 12:36 SeungJu Cheon
  2025-12-30 13:21 ` [PATCH v2] " SeungJu Cheon
  0 siblings, 1 reply; 8+ messages in thread
From: SeungJu Cheon @ 2025-12-30 12:36 UTC (permalink / raw)
  To: antoniu.miclaus, lars, Michael.Hennerich, jic23
  Cc: dlechner, nuno.sa, andy, linux-iio, linux-kernel, SeungJu Cheon

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.

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-01-23 14:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-23 11:56 [PATCH v2] iio:frequency:adf4377: Fix duplicated soft reset mask SeungJu Cheon
2026-01-23 14:35 ` Andy Shevchenko
  -- strict thread matches above, loose matches on Subject: below --
2025-12-30 12:36 [PATCH] " SeungJu Cheon
2025-12-30 13:21 ` [PATCH v2] " SeungJu Cheon
2025-12-31 11:19   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox