mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxime Ripard <mripard@kernel.org>
To: forbidden405@outlook.com
Cc: Michael Turquette <mturquette@baylibre.com>,
	 Stephen Boyd <sboyd@kernel.org>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] clk: set initial best mux parent to current parent when determining rate
Date: Wed, 6 Mar 2024 15:24:05 +0100	[thread overview]
Message-ID: <20240306-inescapable-astute-bobcat-20c3e8@houat> (raw)
In-Reply-To: <20240306-mux-v2-1-92a5fa461fd2@outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

Hi,

On Wed, Mar 06, 2024 at 12:22:23AM +0800, Yang Xiwen via B4 Relay wrote:
> From: Yang Xiwen <forbidden405@outlook.com>
> 
> Originally, the initial clock rate is hardcoded to 0, this can lead to
> some problem when setting a very small rate with CLK_MUX_ROUND_CLOSEST.
> 
> For example, if the lowest possible rate provided by the mux is 1000Hz,
> setting a rate below 500Hz will fail, because no clock can provide a
> better rate than the non-existant 0Hz. But it should succeed with 1000Hz
> being set.
> 
> Setting the initial best parent to current parent could solve this bug.
> 
> Signed-off-by: Yang Xiwen <forbidden405@outlook.com>

That patch makes sense to me, but this changes the behaviour of the function.

Before, if we couldn't find a good configuration for the rate, we were
error'ing out. Now, we keep the current configuration. We should
document the new behaviour in the function documentation, and we should
probably run that through kernelci to make sure we aren't breaking any
platform (and from experience, we probably are).

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2024-03-06 14:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05 16:22 [PATCH v2 0/2] clk: fix mux determine rate logic Yang Xiwen via B4 Relay
2024-03-05 16:22 ` [PATCH v2 1/2] clk: set initial best mux parent to current parent when determining rate Yang Xiwen via B4 Relay
2024-03-06 14:24   ` Maxime Ripard [this message]
2024-03-06 14:30     ` Yang Xiwen
2024-03-05 16:22 ` [PATCH v2 2/2] clk: test: use __clk_mux_determine_rate() and remove FIXME Yang Xiwen 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=20240306-inescapable-astute-bobcat-20c3e8@houat \
    --to=mripard@kernel.org \
    --cc=forbidden405@outlook.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@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

all inboxes | Powered by JetHome®