aboutsummaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorPeng Fan2019-07-31 07:01:45 +0000
committerLukasz Majewski2019-07-31 09:20:51 +0200
commit4b91ec076d800b3ca535dfd99b79798094bd4e52 (patch)
tree2f8a3f544401f2759d235ecd928b2e8b4d923931 /drivers/clk
parentb6c56d90b879a8f94c6a8d470e7d207f9b507401 (diff)
clk: imx: gate2 add set rate
Add set rate for imx clk-gate2 Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/imx/clk-gate2.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/clk/imx/clk-gate2.c b/drivers/clk/imx/clk-gate2.c
index 571be320883..1b9db6e791f 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,