All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 09/16] clk: imx: gate2 add set rate
Date: Wed, 31 Jul 2019 07:01:45 +0000	[thread overview]
Message-ID: <20190731071654.9970-9-peng.fan@nxp.com> (raw)
In-Reply-To: <20190731071654.9970-1-peng.fan@nxp.com>

Add set rate for imx clk-gate2

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---

V3:
 None
V2:
 Rebase

 drivers/clk/imx/clk-gate2.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/clk/imx/clk-gate2.c b/drivers/clk/imx/clk-gate2.c
index 571be32088..1b9db6e791 100644
--- a/drivers/clk/imx/clk-gate2.c
+++ b/drivers/clk/imx/clk-gate2.c
@@ -60,7 +60,18 @@ static int clk_gate2_disable(struct clk *clk)
 	return 0;
 }
 
+static ulong clk_gate2_set_rate(struct clk *clk, ulong rate)
+{
+	struct clk *parent = clk_get_parent(clk);
+
+	if (parent)
+		return clk_set_rate(parent, rate);
+
+	return -ENODEV;
+}
+
 static const struct clk_ops clk_gate2_ops = {
+	.set_rate = clk_gate2_set_rate,
 	.enable = clk_gate2_enable,
 	.disable = clk_gate2_disable,
 	.get_rate = clk_generic_get_rate,
-- 
2.16.4

  parent reply	other threads:[~2019-07-31  7:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31  7:01 [U-Boot] [PATCH V3 01/16] clk: introduce clk_dev_binded Peng Fan
2019-07-31  7:01 ` [U-Boot] [PATCH V3 02/16] clk: use clk_dev_binded Peng Fan
2019-07-31  7:01 ` [U-Boot] [PATCH V3 03/16] clk: mux: add set parent support Peng Fan
2019-07-31  7:01 ` [U-Boot] [PATCH V3 04/16] clk: export mux/divider ops Peng Fan
2019-07-31  7:01 ` [U-Boot] [PATCH V3 05/16] clk: add clk-gate support Peng Fan
2019-07-31  7:01 ` [U-Boot] [PATCH V3 06/16] clk: divider set rate supporrt Peng Fan
2019-07-31  7:01 ` [U-Boot] [PATCH V3 07/16] clk: fixed_rate: export clk_fixed_rate Peng Fan
2019-07-31  7:01 ` [U-Boot] [PATCH V3 08/16] clk: imx: import clk heplers Peng Fan
2019-07-31  7:01 ` Peng Fan [this message]
2019-07-31  7:01 ` [U-Boot] [PATCH V3 10/16] dm: clk: ignore default settings when node not valid Peng Fan
2019-07-31  7:01 ` [U-Boot] [PATCH V3 11/16] clk-provider: include clk-uclass.h Peng Fan
2019-07-31  7:01 ` [U-Boot] [PATCH V3 12/16] clk: add composite clk support Peng Fan
2019-07-31  7:01 ` [U-Boot] [PATCH V3 13/16] clk: gate: support sandbox Peng Fan
2019-07-31  7:02 ` [U-Boot] [PATCH V3 14/16] configs: sandbox: Enable composite clk Peng Fan
2019-07-31  7:02 ` [U-Boot] [PATCH V3 15/16] clk: sandbox: add " Peng Fan
2019-07-31  7:02 ` [U-Boot] [PATCH V3 16/16] test: dm: clk_ccf: test " Peng Fan

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=20190731071654.9970-9-peng.fan@nxp.com \
    --to=peng.fan@nxp.com \
    --cc=u-boot@lists.denx.de \
    /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.