From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-renesas-soc@vger.kernel.org,
Andi Shyti <andi.shyti@kernel.org>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFT 2/2] i2c: rcar: improve accuracy for R-Car Gen3+
Date: Tue, 19 Sep 2023 11:36:43 +0200 [thread overview]
Message-ID: <ZQlrq68kQNWESkkC@shikoro> (raw)
In-Reply-To: <CAMuHMdWO2KVpg50Zxak6e_7-5c5Xg6O2PJkPkTfrR=treOtUig@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]
Hi Geert,
> > + u32 scl_gran;
>
> You may want to store just u16 schd and scld instead, so you don't
> have to calculate them over and over again in rcar_i2c_init().
> They are calculated in rcar_i2c_clock_calculate() (called from .probe())
> anyway to validate ranges.
>
> That would also avoid the need to come up with a better name for
> scl_gran ;-)
I like that idea! Will do.
> > + /* Bail out if values don't fit into 16 bit or SMD became too large */
> > + if (x * RCAR_SCLD_RATIO > 0xffff || RCAR_DEFAULT_SMD > x * RCAR_SCHD_RATIO)
>
> The second part of the check looks wrong to me, as it would reject
> all the recommended register values for SMD and SCHD in the docs .
>
> What does "SMD became too large" mean here?
Seems you clarified this on your own.
I will resend this series with the u16 variables and the cosmetic issues
fixed. And figure out how this slipped through my checkpatch hooks...
Thanks for the review!
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-09-19 9:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-13 6:29 [PATCH RFT 0/2] i2c: rcar: improve Gen3 support Wolfram Sang
2023-09-13 6:29 ` [PATCH RFT 1/2] i2c: rcar: reset controller is mandatory for Gen3+ Wolfram Sang
2023-09-19 8:46 ` Geert Uytterhoeven
2023-09-19 9:19 ` Wolfram Sang
2023-09-19 9:27 ` Geert Uytterhoeven
2023-09-13 6:29 ` [PATCH RFT 2/2] i2c: rcar: improve accuracy for R-Car Gen3+ Wolfram Sang
2023-09-18 14:44 ` Geert Uytterhoeven
2023-09-19 9:14 ` Geert Uytterhoeven
2023-09-19 9:32 ` Geert Uytterhoeven
2023-09-19 9:36 ` Wolfram Sang [this message]
2023-09-19 9:42 ` Geert Uytterhoeven
2023-09-19 9:44 ` Geert Uytterhoeven
2023-09-19 9:30 ` [PATCH RFT 0/2] i2c: rcar: improve Gen3 support Geert Uytterhoeven
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=ZQlrq68kQNWESkkC@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=andi.shyti@kernel.org \
--cc=geert@linux-m68k.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.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