Devicetree
 help / color / mirror / Atom feed
From: Jerome Brunet <jbrunet@baylibre.com>
To: sashiko-bot@kernel.org
Cc: sashiko-reviews@lists.linux.dev,  linux-sunxi@lists.linux.dev,
	robh@kernel.org,  devicetree@vger.kernel.org,
	 conor+dt@kernel.org
Subject: Re: [PATCH v2 4/6] clk: sunxi-ng: div: add read-only operation support
Date: Mon, 29 Jun 2026 15:58:22 +0200	[thread overview]
Message-ID: <1jcxx9a1oh.fsf@starbuckisacylon.baylibre.com> (raw)
In-Reply-To: <20260629130342.73C851F000E9@smtp.kernel.org> (sashiko-bot@kernel.org's message of "Mon, 29 Jun 2026 13:03:41 +0000")

On lun. 29 juin 2026 at 13:03, sashiko-bot@kernel.org wrote:

> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] `ccu_rodiv_ops` omits the `.determine_rate` callback, which breaks rate rounding, reparenting, and proper rate propagation for clocks using `CLK_SET_RATE_PARENT`.
> --
>
> commit 97a1d0e7adc68eb81524d76b0c667da1b5f1be50
> Author: Jerome Brunet <jbrunet@baylibre.com>
>
> clk: sunxi-ng: div: add read-only operation support
>
> Add support for sunxi-ng read-only dividers to be used by the a733
> oscillator detection logic.
>
>> diff --git a/drivers/clk/sunxi-ng/ccu_div.c b/drivers/clk/sunxi-ng/ccu_div.c
>> index 62d680ccb524b..0e3d9e6e30fb0 100644
>> --- a/drivers/clk/sunxi-ng/ccu_div.c
>> +++ b/drivers/clk/sunxi-ng/ccu_div.c
>> @@ -143,3 +143,14 @@ const struct clk_ops ccu_div_ops = {
>>  	.set_rate	= ccu_div_set_rate,
>>  };
>>  EXPORT_SYMBOL_NS_GPL(ccu_div_ops, "SUNXI_CCU");
>> +
>> +const struct clk_ops ccu_rodiv_ops = {
>> +	.disable	= ccu_div_disable,
>> +	.enable		= ccu_div_enable,
>> +	.is_enabled	= ccu_div_is_enabled,
>> +
>> +	.get_parent	= ccu_div_get_parent,
>> +
>> +	.recalc_rate	= ccu_div_recalc_rate,
>
> [Severity: Medium]
> Does this struct need a .determine_rate callback to prevent breaking rate
> rounding and parent rate propagation?

I don't think is a problem in the specific context of this series since
not parent on the RO clock may adjust but it is indeed something to fix
in the next revision

>
> If a driver registers a clock using these exported operations and sets the
> CLK_SET_RATE_PARENT flag, the Common Clock Framework's
> clk_core_round_rate_nolock() falls back to a pass-through behavior when
> .determine_rate is missing. This causes it to forward the child's requested
> rate unmodified to the parent, ignoring the divider scaling, and also causes
> mux reparenting to fail.
>
>> +};
>> +EXPORT_SYMBOL_NS_GPL(ccu_rodiv_ops, "SUNXI_CCU");

-- 
Jerome

  reply	other threads:[~2026-06-29 13:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 12:42 [PATCH v2 0/6] clk: sun6i-rtc: Add support for Allwinner A733 SoC Jerome Brunet
2026-06-29 12:42 ` [PATCH v2 1/6] dt-bindings: rtc: sun6i: add sun60i-a733 support Jerome Brunet
2026-06-29 12:53   ` sashiko-bot
2026-06-29 15:05     ` Jerome Brunet
2026-06-29 15:16       ` Conor Dooley
2026-06-29 15:20         ` Chen-Yu Tsai
2026-06-29 15:27           ` Jerome Brunet
2026-06-29 15:40             ` Conor Dooley
2026-06-29 12:42 ` [PATCH v2 2/6] clk: sunxi-ng: sun6i-rtc: clean up DT usage Jerome Brunet
2026-06-29 15:37   ` Chen-Yu Tsai
2026-06-29 12:42 ` [PATCH v2 3/6] clk: sunxi-ng: sun6i-rtc: Add feature bit for IOSC calibration Jerome Brunet
2026-06-29 15:25   ` Chen-Yu Tsai
2026-06-29 12:42 ` [PATCH v2 4/6] clk: sunxi-ng: div: add read-only operation support Jerome Brunet
2026-06-29 13:03   ` sashiko-bot
2026-06-29 13:58     ` Jerome Brunet [this message]
2026-06-29 12:42 ` [PATCH v2 5/6] clk: sunxi-ng: sun6i-rtc: split main oscillator div and gate Jerome Brunet
2026-06-29 13:12   ` sashiko-bot
2026-06-29 14:15     ` Jerome Brunet
2026-06-29 12:42 ` [PATCH v2 6/6] clk: sunxi-ng: sun6i-rtc: add a733 support Jerome Brunet
2026-06-29 13:15   ` sashiko-bot
2026-06-29 14:24     ` Jerome Brunet
2026-06-29 15:15       ` Chen-Yu Tsai
2026-07-01  5:47 ` [PATCH v2 0/6] clk: sun6i-rtc: Add support for Allwinner A733 SoC Enzo Adriano

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=1jcxx9a1oh.fsf@starbuckisacylon.baylibre.com \
    --to=jbrunet@baylibre.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=sashiko-bot@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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