From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-renesas-soc@vger.kernel.org,
Miquel Raynal <miquel.raynal@bootlin.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
linux-rtc@vger.kernel.org
Subject: Re: [PATCH 3/3] rtc: rzn1: support input frequencies other than 32768Hz
Date: Thu, 10 Apr 2025 22:09:51 +0200 [thread overview]
Message-ID: <Z_glj1NS6yRHHkyR@shikoro> (raw)
In-Reply-To: <CAMuHMdXMPnJ9b_5gZ4SwCAeuHUTr3y92+d94X=os5HaYis1CTw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 409 bytes --]
> > + if (rate < 32000 || rate > BIT(22)) {
>
> Perhaps
>
> #define RTCA0SCMP_MIN 32000
> #define RTCA0SCMP_MASK GEN_MASK(21. 0)
>
> and
>
> if (rate < RTCA0SCMP_MIN || rate > FIELD_MAX(RTCA0SCMP_MASK) + 1)
>
> ?
You really think this is more readable than the original code? I am
really tired of bike-shedding so I don't care much, but I do wonder...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2025-04-10 20:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 11:03 [PATCH 0/3] rtc: rzn1: support XTAL clk and SCMP method Wolfram Sang
2025-03-19 11:03 ` [PATCH 1/3] dt-bindings: rtc: rzn1: add optional second clock Wolfram Sang
2025-04-10 15:08 ` Geert Uytterhoeven
2025-04-10 15:29 ` Geert Uytterhoeven
2025-04-10 20:23 ` Wolfram Sang
2025-04-11 6:20 ` Geert Uytterhoeven
2025-04-11 6:38 ` Wolfram Sang
2025-03-19 11:03 ` [PATCH 2/3] rtc: rzn1: Disable controller before initialization Wolfram Sang
2025-03-19 11:03 ` [PATCH 3/3] rtc: rzn1: support input frequencies other than 32768Hz Wolfram Sang
2025-04-10 15:17 ` Geert Uytterhoeven
2025-04-10 20:09 ` Wolfram Sang [this message]
2025-04-11 6:16 ` Geert Uytterhoeven
2025-04-11 6:39 ` Wolfram Sang
2025-05-01 22:11 ` Wolfram Sang
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=Z_glj1NS6yRHHkyR@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=alexandre.belloni@bootlin.com \
--cc=geert@linux-m68k.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=miquel.raynal@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.