From: Shawn Lin <shawn.lin@rock-chips.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: shawn.lin@rock-chips.com,
Michael Turquette <mturquette@baylibre.com>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] clk: check the actual phase if get_phase is provided
Date: Fri, 26 Feb 2016 09:21:56 +0800 [thread overview]
Message-ID: <56CFA8B4.7070600@rock-chips.com> (raw)
In-Reply-To: <20160225231458.GH28849@codeaurora.org>
On 2016/2/26 7:14, Stephen Boyd wrote:
> On 02/18, Shawn Lin wrote:
>> set_phase does sanity checking of degree and ask sub-driver
[...]
>> already there.
>>
>> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
>>
>> ---
>
> Knee jerk reaction is why does the provider code set a phase that
> isn't requested? Do we need some sort of clk_round_phase() API
> that parallels clk_round_rate() so that drivers know what phase
> they're going to get? Or do drivers not care what phase they get
> when they call clk_set_phase()?
Hi Stephen,
drivers should care what phase they get when calling clk_set_phase(i.e
the drivers setting phase to do tuning work should know what the actual
degrees is, which is important for them to decide the sample window
algorithm).
By looking into the two drivers who use set_phase/get_phase pair
currently, they actually both don'e care what the actual degrees when
they call clk_set_phase. I think that is because the drivers are used
for specific platform which support 0~360 implicitly. But the situation
is NOT always right for cross-platform drivers. So add some sort of
round_phase API is probably sane ?
>>
>> + /* bail early if nothing to do */
>> + if (degrees == clk->core->phase)
>> + goto out;
>> +
>
> This could be split out into a different "optimization" patch and
> applied today.
>
ok, I will split this section into a different patch today.
--
Best Regards
Shawn Lin
next prev parent reply other threads:[~2016-02-26 1:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 1:38 [PATCH v2] clk: check the actual phase if get_phase is provided Shawn Lin
2016-02-25 23:14 ` Stephen Boyd
2016-02-26 1:21 ` Shawn Lin [this message]
2016-02-27 0:10 ` Stephen Boyd
2016-02-29 1:14 ` Shawn Lin
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=56CFA8B4.7070600@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.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