From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: Update comment for clk_round_rate()
Date: Thu, 5 Apr 2012 09:03:24 +0200 [thread overview]
Message-ID: <20120405070324.GB27274@pengutronix.de> (raw)
In-Reply-To: <4F7D299E.1050307@st.com>
Hello,
On Thu, Apr 05, 2012 at 10:41:58AM +0530, Viresh Kumar wrote:
> On 4/4/2012 11:37 PM, Turquette, Mike wrote:
> > The common clk framework doesn't enforce any policy like this, nor do
> > I think it should. The clk framework is far from complete and I
> > wouldn't be surprised if we see folks who want their rounded rate to
> > represent a minimum value (instead of a maximum as your patch states).
>
> Ok. Just for example, suppose foo_clk can have following rates:
> 100, 110, 120, 130, 140.
>
> And we call round_rate with a value of 126.
>
> Now i can't visualize why would anybody want it to return 130 (above the
> limits requested)? I agree both 100 and 120 can be returned, based on
> your below logic.
It depends on your scenario. E.g. for an UART clock it might be better
to choose 130. Here choosing the frequency is not about a fixed maximum
but to match the sample rate of the device connect to your UART.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2012-04-05 7:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-04 17:27 [PATCH] clk: Update comment for clk_round_rate() viresh kumar
2012-04-04 18:07 ` Turquette, Mike
2012-04-05 5:11 ` Viresh Kumar
2012-04-05 7:03 ` Uwe Kleine-König [this message]
2012-04-05 7:07 ` Viresh Kumar
2012-04-05 7:26 ` Uwe Kleine-König
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=20120405070324.GB27274@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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 NNTP newsgroup(s).