From: Biju Das <biju.das.jz@bp.renesas.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: biju.das.au <biju.das.au@gmail.com>,
"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
Thierry Reding <thierry.reding@gmail.com>,
Philipp Zabel <p.zabel@pengutronix.de>
Subject: RE: [PATCH v18 3/4] pwm: Add support for RZ/G2L GPT
Date: Fri, 15 Mar 2024 07:19:01 +0000 [thread overview]
Message-ID: <OSAPR01MB15879D814E3B04B12D29052286282@OSAPR01MB1587.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <ipm72ujiqm4k2nuq7a6sdmqdrwjwrn7uyp4brgbvmmb5mgu6ko@ljltsjnljett>
Hi Uwe,
> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Sent: Thursday, March 14, 2024 10:33 PM
> Subject: Re: [PATCH v18 3/4] pwm: Add support for RZ/G2L GPT
>
> Hello,
>
> On Thu, Mar 14, 2024 at 06:10:50PM +0000, Biju Das wrote:
> > > On Tue, Feb 20, 2024 at 07:43:17PM +0000, Biju Das wrote:
> > > > +
> > > > +static inline u64 rzg2l_gpt_mul_u64_u64_div_u64(u64 a, u64 b, u64
> > > > +c) {
> > > > + u64 retval;
> > > > +
> > > > + if (a > b)
> > > > + retval = mul_u64_u64_div_u64(b, a, c);
> > > > + else
> > > > + retval = mul_u64_u64_div_u64(a, b, c);
> > >
> > > With
> > > https://lore.kernel.org/lkml/20240303092408.662449-2-u.kleine-koenig
> > > @pengutronix.de this function can be replaced by a direct call to
> > > mul_u64_u64_div_u64().
> > > I expect this patch to go into v6.9-rc1 as akpm picked it up before the merge window opened.
> >
> > Ok, I will hold next version until v6.9-rc1 as for-pwm-nexxt doesn't have this patch??
>
> I will rebase the stuff for the v6.10-rc1 merge window on v6.9-rc1, so (assuming my guess is right) you
> can profit of the improved
> mul_u64_u64_div_u64() call. (And even if the patch will go in later, we can live with the inexact
> configuration for that period.)
OK.
>
> > > > +static u32 rzg2l_gpt_calculate_pv_or_dc(u64 period_or_duty_cycle,
> > > > +u8
> > > > +prescale) {
> > > > + return min_t(u64, (period_or_duty_cycle + (1 << (2 * prescale)) - 1) >> (2 * prescale),
> > > > + U32_MAX);
> > >
> > > Can the addition overflow? Is the addition even right? This function
> > > is used in .apply() where it's usually right to round down.
> >
> > No, It won't overflow. The logic is proposed by you in v17 for
> > DIV64_U64_ROUND_UP and it is passing all tests with PWM_DEBUG=y.
>
> Then believe my former self, I didn't redo all the maths in this cycle.
>
> > > > + pm_runtime_enable(&pdev->dev);
> > > > + ret = pm_runtime_resume_and_get(&pdev->dev);
> > > > + if (ret)
> > > > + goto err_reset;
> > > > +
> > > > + ret = clk_rate_exclusive_get(rzg2l_gpt->clk);
> > >
> > > There is a devm variant of this function in the mean time.
> >
> > OK, currently for testing I picked it from next.
>
> For the next submission round make sure to properly use the --base parameter to not annoy the build
> bots. Or feel free to base your patch on next.
OK, I will rebase to next and send v19.
Note:
6.9-rc1 on for-nexxt is still missing a patch[1] for cpu performance on ARM64
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.8&id=98323e9d70172f1b46d1cadb20d6c54abf62870d
Cheers,
Biju
next prev parent reply other threads:[~2024-03-15 7:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 19:43 [PATCH v18 0/4] Add support for RZ/G2L GPT Biju Das
2024-02-20 19:43 ` [PATCH v18 1/4] dt-bindings: pwm: Add RZ/G2L GPT binding Biju Das
2024-02-20 19:43 ` [PATCH v18 2/4] dt-bindings: pwm: rzg2l-gpt: Document renesas,poegs property Biju Das
2024-02-20 19:43 ` [PATCH v18 3/4] pwm: Add support for RZ/G2L GPT Biju Das
2024-03-12 7:20 ` Uwe Kleine-König
2024-03-12 8:11 ` Geert Uytterhoeven
2024-03-12 9:27 ` Uwe Kleine-König
2024-03-14 18:10 ` Biju Das
2024-03-14 22:33 ` Uwe Kleine-König
2024-03-15 7:19 ` Biju Das [this message]
2024-02-20 19:43 ` [PATCH v18 4/4] pwm: rzg2l-gpt: Add support for gpt linking with poeg Biju Das
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=OSAPR01MB15879D814E3B04B12D29052286282@OSAPR01MB1587.jpnprd01.prod.outlook.com \
--to=biju.das.jz@bp.renesas.com \
--cc=biju.das.au@gmail.com \
--cc=fabrizio.castro.jz@renesas.com \
--cc=geert+renesas@glider.be \
--cc=kernel@pengutronix.de \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).