Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "David Lechner" <dlechner@baylibre.com>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/4] iio: adc: ad7124: add external clock support
Date: Sat, 30 Aug 2025 20:48:24 +0100	[thread overview]
Message-ID: <20250830204824.2f9d7a48@jic23-huawei> (raw)
In-Reply-To: <CAHp75Vf8fAFin1tJ-yjr22RPuDgBEBnj6JO3GkjDcZsmYoOfYA@mail.gmail.com>

On Fri, 29 Aug 2025 22:11:12 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Fri, Aug 29, 2025 at 8:19 PM David Lechner <dlechner@baylibre.com> wrote:
> > On 8/29/25 10:53 AM, Andy Shevchenko wrote:  
> > > On Fri, Aug 29, 2025 at 12:55 AM David Lechner <dlechner@baylibre.com> wrote:  
> 
> ...
> 
> > >> +                       if (clk_hz > MEGA) {  
> > >
> > > I read your answer, but maybe I missed something?  Can we use (1 *
> > > HZ_PER_MHZ) here?  
> >
> > I suppose we can. But it doesn't add any additional information.
> > We already know we are dealing with Hz because of clk_hz and 1
> > is implicit. So it is just a matter of style preference. Since I
> > read a lot of code, I tend to prefer the minimal approach - it is
> > less to read and still has the same meaning.  
> 
> Physicist in me prefers pedantism in comparison of the units. We don't
> compare kilometers with kilograms (maybe not the best example, though,
> if you understand what I mean :-).
> 
As I don't think either of you have particularly strong opinions on this
(or at least you'll both be flexible) and I want to merge it.
I tweaked to 1 * HZ_PER_MHZ and applied the series.

Thanks,

Jonathan

> > >> +                               clk_sel = AD7124_ADC_CONTROL_CLK_SEL_EXT_DIV4;
> > >> +                               st->clk_hz = clk_hz / 4;
> > >> +                       } else {
> > >> +                               clk_sel = AD7124_ADC_CONTROL_CLK_SEL_EXT;
> > >> +                               st->clk_hz = clk_hz;
> > >> +                       }  
> 
> 


  reply	other threads:[~2025-08-30 19:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28 21:54 [PATCH v3 0/4] iio: adc: ad7124: proper clock support David Lechner
2025-08-28 21:54 ` [PATCH v3 1/4] dt-bindings: iio: adc: adi,ad7124: fix clocks properties David Lechner
2025-08-28 21:54 ` [PATCH v3 2/4] iio: adc: ad7124: do not require mclk David Lechner
2025-08-28 21:54 ` [PATCH v3 3/4] iio: adc: ad7124: add external clock support David Lechner
2025-08-29 15:53   ` Andy Shevchenko
2025-08-29 17:19     ` David Lechner
2025-08-29 19:11       ` Andy Shevchenko
2025-08-30 19:48         ` Jonathan Cameron [this message]
2025-08-28 21:54 ` [PATCH v3 4/4] iio: adc: ad7124: add clock output support David Lechner

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=20250830204824.2f9d7a48@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /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