From: Yang Xiwen <forbidden405@outlook.com>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>
Cc: Maxime Ripard <mripard@kernel.org>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
Yang Xiwen <forbidden405@outlook.com>
Subject: [PATCH v2 2/2] clk: test: use __clk_mux_determine_rate() and remove FIXME
Date: Wed, 06 Mar 2024 00:22:24 +0800 [thread overview]
Message-ID: <20240306-mux-v2-2-92a5fa461fd2@outlook.com> (raw)
In-Reply-To: <20240306-mux-v2-0-92a5fa461fd2@outlook.com>
Recent clk core fix resolved the bug in the FIXME comment. Now replace
the .determine_rate field back to __clk_mux_determine_rate() and remove
the FIXME comment.
Fixes: aebddfe2dfaf ("clk: test: Add a determine_rate hook")
Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
---
drivers/clk/clk_test.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/drivers/clk/clk_test.c b/drivers/clk/clk_test.c
index 39e2b5ff4f51..0c91dc14d942 100644
--- a/drivers/clk/clk_test.c
+++ b/drivers/clk/clk_test.c
@@ -106,23 +106,7 @@ static const struct clk_ops clk_dummy_minimize_rate_ops = {
};
static const struct clk_ops clk_dummy_single_parent_ops = {
- /*
- * FIXME: Even though we should probably be able to use
- * __clk_mux_determine_rate() here, if we use it and call
- * clk_round_rate() or clk_set_rate() with a rate lower than
- * what all the parents can provide, it will return -EINVAL.
- *
- * This is due to the fact that it has the undocumented
- * behaviour to always pick up the closest rate higher than the
- * requested rate. If we get something lower, it thus considers
- * that it's not acceptable and will return an error.
- *
- * It's somewhat inconsistent and creates a weird threshold
- * between rates above the parent rate which would be rounded to
- * what the parent can provide, but rates below will simply
- * return an error.
- */
- .determine_rate = __clk_mux_determine_rate_closest,
+ .determine_rate = __clk_mux_determine_rate,
.set_parent = clk_dummy_single_set_parent,
.get_parent = clk_dummy_single_get_parent,
};
--
2.43.0
prev parent reply other threads:[~2024-03-05 16:22 UTC|newest]
Thread overview: 3+ 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
2024-03-05 16:22 ` [PATCH v2 1/2] clk: set initial best mux parent to current parent when determining rate Yang Xiwen
2024-03-05 16:22 ` Yang Xiwen [this message]
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-mux-v2-2-92a5fa461fd2@outlook.com \
--to=forbidden405@outlook.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).