public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Michael.Hennerich@analog.com, nuno.sa@analog.com
Cc: SeungJu Cheon <suunj1331@gmail.com>,
	antoniu.miclaus@analog.com, lars@metafoo.de,
	andriy.shevchenko@intel.com, dlechner@baylibre.com,
	andy@kernel.org, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio:frequency:adf4377: Fix duplicated soft reset mask
Date: Fri, 23 Jan 2026 09:44:09 +0000	[thread overview]
Message-ID: <20260123094409.111e971b@jic23-huawei> (raw)
In-Reply-To: <20260111120857.5087e396@jic23-huawei>

On Sun, 11 Jan 2026 12:09:25 +0000
Jonathan Cameron <jic23@kernel.org> wrote:

> On Wed, 31 Dec 2025 13:19:46 +0200
> Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> 
> > On Tue, Dec 30, 2025 at 3:21 PM SeungJu Cheon <suunj1331@gmail.com> wrote:  
> > >
> > > 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.    
> > 
> > an incomplete
> >   
> > > Fix by using both masks as done in regmap_update_bits() above.    
> > 
> > ...
> > 
> > 
> > May I ask how you tested this? Logically from the code it sounds
> > correct, but I haven't read the datasheet yet, so I can't tell if this
> > is the expected value to read or not.
> > 
> >   
> > >         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);    
> > 
> > Okay, I opened the datasheet, and the below is what I read there. The
> > code first sets the SOFT_RESET_R and SOFT_RESET bits to "1", and waits
> > for them to be cleared. But the Table 43 does not mention that
> > SOFT_RESET_R is auto cleaned, and actually I don't see with a brief
> > look what the "repeat of" term means.
> > 
> > And for normal operation they needs to be 0ed as per:
> >   "SOFT_RESET, SOFT_RESET_R, RST_SYS, and ADC_ST_CNV are the only
> > remaining RW bit fields not mentioned yet, and must also be set to
> > their POR state (see Table 34)."
> > 
> > With that said, I would wait for AD people to clarify the programming
> > workflow here.
> >   
> 
> Small kernel development process thing as well. Please don't send a v2 in reply to a v1.
> It can become very confusing if we end up with a larger number of versions.
> Much better to just post a new thread for each version, and include
> a link back to the lore archive of the previous version in your cover letter.
> 
> Also from a practical point of view, it ends up pages up in people's inboxes and
> so is is less likely to get reviewed!
> 
> Thanks
> 
> Jonathan
> 
ADI folk. This is waiting for one of you to take a look at the questions Andy raised.

Thanks!

Jonathan


  reply	other threads:[~2026-01-23  9:44 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 ` [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 [this message]
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=20260123094409.111e971b@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=dlechner@baylibre.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=suunj1331@gmail.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