[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1471354514-24224-15-git-send-email-k.kozlowski@samsung.com>
Date: Tue, 16 Aug 2016 15:35:11 +0200
From: Krzysztof Kozlowski <k.kozlowski@...sung.com>
To: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...eaurora.org>,
Stephen Warren <swarren@...dotorg.org>,
Lee Jones <lee@...nel.org>, Eric Anholt <eric@...olt.net>,
Florian Fainelli <f.fainelli@...il.com>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
bcm-kernel-feedback-list@...adcom.com,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
Sylwester Nawrocki <s.nawrocki@...sung.com>,
Tomasz Figa <tomasz.figa@...il.com>,
Kukjin Kim <kgene@...nel.org>,
Russell King <linux@...linux.org.uk>,
Mark Brown <broonie@...nel.org>, linux-clk@...r.kernel.org,
linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-samsung-soc@...r.kernel.org, linux-i2c@...r.kernel.org,
alsa-devel@...a-project.org
Cc: Marek Szyprowski <m.szyprowski@...sung.com>,
Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>,
Javier Martinez Canillas <javier@....samsung.com>,
a.hajda@...sung.com,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Subject: [RFC 14/17] clk: samsung: clkout: samsung: Switch to new clock
controller API
Allocate a clock controller and use new clk_register_with_ctrl() API.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
---
drivers/clk/samsung/clk-exynos-clkout.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
index 96fab6cfb202..9c57a623e741 100644
--- a/drivers/clk/samsung/clk-exynos-clkout.c
+++ b/drivers/clk/samsung/clk-exynos-clkout.c
@@ -26,6 +26,7 @@
#define EXYNOS5_CLKOUT_MUX_MASK 0x1f
struct exynos_clkout {
+ struct clk_ctrl *clk_ctrl;
struct clk_gate gate;
struct clk_mux mux;
spinlock_t slock;
@@ -66,6 +67,10 @@ static void __init exynos_clkout_init(struct device_node *node, u32 mux_mask)
if (!clkout)
return;
+ clkout->clk_ctrl = clk_ctrl_register(NULL);
+ if (IS_ERR(clkout->clk_ctrl))
+ goto free_clkout;
+
spin_lock_init(&clkout->slock);
parent_count = 0;
@@ -84,7 +89,7 @@ static void __init exynos_clkout_init(struct device_node *node, u32 mux_mask)
}
if (!parent_count)
- goto free_clkout;
+ goto free_ctrl;
clkout->reg = of_iomap(node, 0);
if (!clkout->reg)
@@ -100,7 +105,7 @@ static void __init exynos_clkout_init(struct device_node *node, u32 mux_mask)
clkout->mux.shift = EXYNOS_CLKOUT_MUX_SHIFT;
clkout->mux.lock = &clkout->slock;
- clkout->clk_table[0] = clk_register_composite(NULL, "clkout",
+ clkout->clk_table[0] = clk_register_composite(NULL, clkout->clk_ctrl, "clkout",
parent_names, parent_count, &clkout->mux.hw,
&clk_mux_ops, NULL, NULL, &clkout->gate.hw,
&clk_gate_ops, CLK_SET_RATE_PARENT
@@ -126,6 +131,8 @@ clks_put:
for (i = 0; i < EXYNOS_CLKOUT_PARENTS; ++i)
if (!IS_ERR(parents[i]))
clk_put(parents[i]);
+free_ctrl:
+ clk_ctrl_unregister(clkout->clk_ctrl);
free_clkout:
kfree(clkout);
--
1.9.1
Powered by blists - more mailing lists