From: James Hogan <james.hogan@imgtec.com>
To: Mike Turquette <mturquette@linaro.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Cc: Chao Xie <xiechao.mail@gmail.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
James Hogan <james.hogan@imgtec.com>
Subject: [RFC PATCH v1 0/3] clk: implement remuxing during set_rate
Date: Fri, 22 Mar 2013 15:43:48 +0000 [thread overview]
Message-ID: <1363967031-22781-1-git-send-email-james.hogan@imgtec.com> (raw)
This patchset adds support for automatic selection of the best parent
for a clock mux, i.e. the one which can provide the closest clock rate
to that requested. It can be controlled by a new CLK_SET_RATE_REMUX flag
so that it doesn't happen unless explicitly allowed.
This works by way of adding a parameter to the round_rate clock op which
allows the clock driver to optionally select a different parent index.
This is used in clk_calc_new_rates to decide whether to initiate a
set_parent operation. This would obviously require the argument to be
added to all users of round_rate, something this patchset doesn't do as
I'm not sure if it's really the preferred method (hence the RFC).
An alternative would be to add a new callback, but that would complicate
the code in clk.c somewhat. I suppose it would also be possible for the
round_rate callback to call a function to set a struct clk member to
mark that the parent should change (it's all within mutex protected
code after all). Comments anyone?
James Hogan (3):
clk: abstract parent cache
clk: add support for clock remuxing
clk: clk-mux: implement remuxing
drivers/clk/clk-mux.c | 47 ++++++++++++++++++
drivers/clk/clk.c | 115 ++++++++++++++++++++++++++++++-------------
include/linux/clk-provider.h | 7 ++-
3 files changed, 133 insertions(+), 36 deletions(-)
--
1.8.1.2
next reply other threads:[~2013-03-22 15:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 15:43 James Hogan [this message]
2013-03-22 15:43 ` [RFC PATCH v1 1/3] clk: abstract parent cache James Hogan
2013-03-22 15:43 ` [RFC PATCH v1 2/3] clk: add support for clock remuxing James Hogan
2013-03-22 15:43 ` [RFC PATCH v1 3/3] clk: clk-mux: implement remuxing James Hogan
2013-04-03 2:06 ` [RFC PATCH v1 0/3] clk: implement remuxing during set_rate Stephen Boyd
2013-04-03 21:08 ` James Hogan
2013-04-03 21:34 ` Mike Turquette
2013-04-19 16:41 ` James Hogan
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=1363967031-22781-1-git-send-email-james.hogan@imgtec.com \
--to=james.hogan@imgtec.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=s.hauer@pengutronix.de \
--cc=xiechao.mail@gmail.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®