* [PATCH] clk: cs2000: Add cs2000_set_saved_rate
@ 2017-04-19 17:46 Yoshihiro Kaneko
2017-04-19 23:57 ` Kuninori Morimoto
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Yoshihiro Kaneko @ 2017-04-19 17:46 UTC (permalink / raw)
To: linux-clk
Cc: Michael Turquette, Stephen Boyd, Geert Uytterhoeven, Simon Horman,
Magnus Damm, linux-renesas-soc
From: Gaku Inami <gaku.inami.xw@bp.renesas.com>
This patch adds the common function to reset the clk rate in order to
be able to use it in other cases.
Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
---
This patch is based on the clk-next branch of linux-clk tree.
drivers/clk/clk-cs2000-cp.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/clk-cs2000-cp.c b/drivers/clk/clk-cs2000-cp.c
index 4df38c5..5b3516d 100644
--- a/drivers/clk/clk-cs2000-cp.c
+++ b/drivers/clk/clk-cs2000-cp.c
@@ -324,6 +324,15 @@ static int cs2000_set_rate(struct clk_hw *hw,
return __cs2000_set_rate(priv, ch, rate, parent_rate);
}
+static int cs2000_set_saved_rate(struct cs2000_priv *priv)
+{
+ int ch = 0; /* it uses ch0 only at this point */
+
+ return __cs2000_set_rate(priv, ch,
+ priv->saved_rate,
+ priv->saved_parent_rate);
+}
+
static int cs2000_enable(struct clk_hw *hw)
{
struct cs2000_priv *priv = hw_to_priv(hw);
@@ -516,11 +525,8 @@ static int cs2000_probe(struct i2c_client *client,
static int cs2000_resume(struct device *dev)
{
struct cs2000_priv *priv = dev_get_drvdata(dev);
- int ch = 0; /* it uses ch0 only at this point */
- return __cs2000_set_rate(priv, ch,
- priv->saved_rate,
- priv->saved_parent_rate);
+ return cs2000_set_saved_rate(priv);
}
static const struct dev_pm_ops cs2000_pm_ops = {
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: cs2000: Add cs2000_set_saved_rate
2017-04-19 17:46 [PATCH] clk: cs2000: Add cs2000_set_saved_rate Yoshihiro Kaneko
@ 2017-04-19 23:57 ` Kuninori Morimoto
2017-07-21 20:16 ` Stephen Boyd
2017-08-31 18:32 ` Stephen Boyd
2 siblings, 0 replies; 5+ messages in thread
From: Kuninori Morimoto @ 2017-04-19 23:57 UTC (permalink / raw)
To: Yoshihiro Kaneko
Cc: linux-clk, Michael Turquette, Stephen Boyd, Geert Uytterhoeven,
Simon Horman, Magnus Damm, linux-renesas-soc
Hi
> From: Gaku Inami <gaku.inami.xw@bp.renesas.com>
>
> This patch adds the common function to reset the clk rate in order to
> be able to use it in other cases.
>
> Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
> Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> ---
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: cs2000: Add cs2000_set_saved_rate
2017-04-19 17:46 [PATCH] clk: cs2000: Add cs2000_set_saved_rate Yoshihiro Kaneko
2017-04-19 23:57 ` Kuninori Morimoto
@ 2017-07-21 20:16 ` Stephen Boyd
2017-08-17 12:43 ` Geert Uytterhoeven
2017-08-31 18:32 ` Stephen Boyd
2 siblings, 1 reply; 5+ messages in thread
From: Stephen Boyd @ 2017-07-21 20:16 UTC (permalink / raw)
To: Yoshihiro Kaneko
Cc: linux-clk, Michael Turquette, Geert Uytterhoeven, Simon Horman,
Magnus Damm, linux-renesas-soc
On 04/20, Yoshihiro Kaneko wrote:
> From: Gaku Inami <gaku.inami.xw@bp.renesas.com>
>
> This patch adds the common function to reset the clk rate in order to
> be able to use it in other cases.
>
> Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
> Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> ---
> This patch is based on the clk-next branch of linux-clk tree.
Geert?
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: cs2000: Add cs2000_set_saved_rate
2017-07-21 20:16 ` Stephen Boyd
@ 2017-08-17 12:43 ` Geert Uytterhoeven
0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2017-08-17 12:43 UTC (permalink / raw)
To: Stephen Boyd
Cc: Yoshihiro Kaneko, linux-clk, Michael Turquette,
Geert Uytterhoeven, Simon Horman, Magnus Damm, Linux-Renesas
Hi Stephen,
On Fri, Jul 21, 2017 at 10:16 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 04/20, Yoshihiro Kaneko wrote:
>> From: Gaku Inami <gaku.inami.xw@bp.renesas.com>
>>
>> This patch adds the common function to reset the clk rate in order to
>> be able to use it in other cases.
>>
>> Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
>> Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
>> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
>> ---
>> This patch is based on the clk-next branch of linux-clk tree.
>
> Geert?
The CS2000 clock generator is not a Renesas part, so please take it directly.
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: cs2000: Add cs2000_set_saved_rate
2017-04-19 17:46 [PATCH] clk: cs2000: Add cs2000_set_saved_rate Yoshihiro Kaneko
2017-04-19 23:57 ` Kuninori Morimoto
2017-07-21 20:16 ` Stephen Boyd
@ 2017-08-31 18:32 ` Stephen Boyd
2 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2017-08-31 18:32 UTC (permalink / raw)
To: Yoshihiro Kaneko
Cc: linux-clk, Michael Turquette, Geert Uytterhoeven, Simon Horman,
Magnus Damm, linux-renesas-soc
On 04/20, Yoshihiro Kaneko wrote:
> From: Gaku Inami <gaku.inami.xw@bp.renesas.com>
>
> This patch adds the common function to reset the clk rate in order to
> be able to use it in other cases.
>
> Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
> Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-08-31 18:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-19 17:46 [PATCH] clk: cs2000: Add cs2000_set_saved_rate Yoshihiro Kaneko
2017-04-19 23:57 ` Kuninori Morimoto
2017-07-21 20:16 ` Stephen Boyd
2017-08-17 12:43 ` Geert Uytterhoeven
2017-08-31 18:32 ` Stephen Boyd
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).