From: Stephen Boyd <sboyd@codeaurora.org>
To: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
mturquette@linaro.org, haojian.zhuang@gmail.com,
james.hogan@imgtec.com
Subject: Re: [PATCH 1/2] clk: divider: don't set_rate with CLK_DIVIDER_READ_ONLY flag
Date: Thu, 4 Jun 2015 15:44:07 -0700 [thread overview]
Message-ID: <20150604224407.GC8099@codeaurora.org> (raw)
In-Reply-To: <1428392806-14538-1-git-send-email-jy0922.shim@samsung.com>
On 04/07, Joonyoung Shim wrote:
> Even if use CLK_DIVIDER_READ_ONLY flag, divider setting can be changed
> by set_rate callback. Don't change divider setting from set_rate
> callback of divider with CLK_DIVIDER_READ_ONLY flag.
>
> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> ---
> drivers/clk/clk-divider.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
> index 25006a8..ce34d29a 100644
> --- a/drivers/clk/clk-divider.c
> +++ b/drivers/clk/clk-divider.c
> @@ -384,6 +384,9 @@ static int clk_divider_set_rate(struct clk_hw *hw, unsigned long rate,
> unsigned long flags = 0;
> u32 val;
>
> + if (divider->flags & CLK_DIVIDER_READ_ONLY)
> + return 0;
> +
> value = divider_get_val(rate, parent_rate, divider->table,
> divider->width, divider->flags);
>
I wonder if it would make more sense to have different ops for
read only dividers. We would need to have an empty clk_set_rate
op in the case where the CCF tries to set the rate to what it
already is and then the proper recalc_rate and round_rate ops for
read only devices. At the least, this patch looks correct.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
prev parent reply other threads:[~2015-06-04 22:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 7:46 [PATCH 1/2] clk: divider: don't set_rate with CLK_DIVIDER_READ_ONLY flag Joonyoung Shim
2015-04-07 7:46 ` [PATCH 2/2] clk: divider: fix to set parent rate from " Joonyoung Shim
2015-05-12 23:25 ` Michael Turquette
2015-05-12 23:25 ` Michael Turquette
2015-05-12 23:57 ` Stephen Boyd
2015-05-15 2:12 ` Joonyoung Shim
2015-06-04 22:42 ` Stephen Boyd
2015-05-12 23:59 ` [PATCH 1/2] clk: divider: don't set_rate with " Stephen Boyd
2015-05-15 1:52 ` Joonyoung Shim
2015-06-04 22:44 ` Stephen Boyd [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=20150604224407.GC8099@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=haojian.zhuang@gmail.com \
--cc=james.hogan@imgtec.com \
--cc=jy0922.shim@samsung.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.