From: "Cunhao Lu" <1579567540@qq.com>
To: "Heiko Stuebner" <heiko@sntech.de>
Cc: linux-clk <linux-clk@vger.kernel.org>,
devicetree <devicetree@vger.kernel.org>,
"Richard Cochran" <richardcochran@gmail.com>,
"Elaine Zhang" <zhangqing@rock-chips.com>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Conor Dooley" <conor+dt@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Jerome Brunet" <jbrunet+clk@baylibre.com>,
"Brian Masney" <bmasney+clk@redhat.com>,
"Stephen Boyd" <sboyd@kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-rockchip <linux-rockchip@lists.infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH v5 2/4] clk: rockchip: Add internal support for 24-bit fractional dividers
Date: Mon, 16 Nov 2026 11:17:32 +0800 [thread overview]
Message-ID: <tencent_A76502128C463402C8115BFD549A4E69CE09@qq.com> (raw)
In-Reply-To: <Yf6NfRPFTxKjDagKAm6hpw@sntech.de>
Hi,
Thank you very much for your review.
> > Add an internal Rockchip fractional-divider helper and clock branch type
> > for this register layout. This provides the support needed by the RK3572
> > audio fractional clocks.
>
> Please add a paragraph about the "v2" naming.
> I assume the v2 is a Rockchip naming, because v1 was the other one that
> could still fit the regular franctional divider.
>
> > +static inline u32 clk_fd_v2_readl(struct clk_fractional_divider_v2 *fd,
> > + void __iomem *reg)
> > +{
> > + return readl(reg);
> > +}
> > +
> > +static inline void clk_fd_v2_writel(struct clk_fractional_divider_v2 *fd,
> > + void __iomem *reg, u32 val)
> > +{
> > + writel(val, reg);
> > +}
>
> why do we have those? They do not serve any purpose I can see.
> So please just use readl and writel directly at the appropriate places.
>
> [...]
>
> > + if (fd->flags & CLK_FRAC_DIVIDER_ZERO_BASED) {
> > + (*m)--;
> > + (*n)--;
> > + }
>
> ... blank line please ...
>
> > + if (!*m && !(fd->flags & CLK_FRAC_DIVIDER_ZERO_BASED))
> > + return clk_fd_v2_get_low_rate_divider(fd, rate, parent_rate, m, n);
>
> ... blank line please ...
>
> [...]
>
> > +static const struct clk_ops clk_fractional_divider_ops_v2 = {
> > + .recalc_rate = clk_fd_v2_recalc_rate,
> > + .determine_rate = clk_fd_v2_determine_rate,
> > + .set_rate = clk_fd_v2_set_rate,
> > +};
> > +
> > +static struct clk_hw *clk_hw_register_fractional_divider_v2(struct device *dev,
>
> maybe adapt the function name.
> Function above abbreviated things to
>
> clk_fd_v2_something, so naming this clk_hw_register_fd_v2()
> might make that line less unwieldy?
I will fix these issues in v6.
Best regards,
Cunhao Lu
pw-bot: cr
next prev parent reply other threads:[~2026-11-16 3:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 9:43 [PATCH v5 0/4] clk: rockchip: Add RK3572 clock and reset support Cunhao Lu via B4 Relay
2026-10-30 9:43 ` [PATCH v5 1/4] dt-bindings: clock: rockchip: Add RK3572 CRU Cunhao Lu via B4 Relay
2026-11-02 8:02 ` Krzysztof Kozlowski
2026-10-30 9:43 ` [PATCH v5 2/4] clk: rockchip: Add internal support for 24-bit fractional dividers Cunhao Lu via B4 Relay
2026-11-13 21:25 ` Heiko Stuebner
2026-11-16 3:17 ` Cunhao Lu [this message]
2026-10-30 9:43 ` [PATCH v5 3/4] clk: rockchip: Add composite clock macro with mux table Cunhao Lu via B4 Relay
2026-10-30 9:44 ` [PATCH v5 4/4] clk: rockchip: Add RK3572 clock and reset support Cunhao Lu via B4 Relay
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=tencent_A76502128C463402C8115BFD549A4E69CE09@qq.com \
--to=1579567540@qq.com \
--cc=bmasney+clk@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=jbrunet+clk@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=zhangqing@rock-chips.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
all inboxes | Powered by JetHome®