From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>,
s.hauer@pengutronix.de, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Subject: [PATCH v5 1/8] clk: core: New macro CLK_OF_DECLARE_DRIVER
Date: Tue, 5 Jul 2016 18:23:25 +0200 [thread overview]
Message-ID: <1467735814-23518-2-git-send-email-ricardo.ribalda@gmail.com> (raw)
In-Reply-To: <1467735814-23518-1-git-send-email-ricardo.ribalda@gmail.com>
This will be used by drivers that requires initialization at
of_clk_init() time and also during platform device probing.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
include/linux/clk-provider.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index a39c0c530778..f403b8a5f8ca 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -780,6 +780,18 @@ extern struct of_device_id __clk_of_table;
#define CLK_OF_DECLARE(name, compat, fn) OF_DECLARE_1(clk, name, compat, fn)
+/*
+ * Use this macro when you have a driver that requires two initialization
+ * routines, one at of_clk_init(), and one at platform device probe
+ */
+#define CLK_OF_DECLARE_DRIVER(name, compat, fn) \
+ static void name##_of_clk_init_driver(struct device_node *np) \
+ { \
+ of_node_clear_flag(np, OF_POPULATED); \
+ fn(np); \
+ } \
+ OF_DECLARE_1(clk, name, compat, name##_of_clk_init_driver)
+
#ifdef CONFIG_OF
int of_clk_add_provider(struct device_node *np,
struct clk *(*clk_src_get)(struct of_phandle_args *args,
--
2.8.1
next prev parent reply other threads:[~2016-07-05 16:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-05 16:23 [PATCH v5 0/8] clk: Don't duplicate initialization on platform_dev Ricardo Ribalda Delgado
2016-07-05 16:23 ` Ricardo Ribalda Delgado [this message]
2016-08-13 1:16 ` [PATCH v5 1/8] clk: core: New macro CLK_OF_DECLARE_DRIVER Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 2/8] clk: axis: Use new " Ricardo Ribalda Delgado
2016-08-13 1:16 ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 3/8] clk: npx: " Ricardo Ribalda Delgado
2016-08-13 1:16 ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 4/8] clk: sunxi: mod0: " Ricardo Ribalda Delgado
2016-08-13 1:16 ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 4/8] clk: sunxi: " Ricardo Ribalda Delgado
2016-08-13 1:16 ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 5/8] clk: sunxi: apb0: " Ricardo Ribalda Delgado
2016-08-13 1:16 ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 5/8] clk: sunxi: " Ricardo Ribalda Delgado
2016-08-13 1:16 ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 6/8] clk: core: Avoid double initialization of clocks Ricardo Ribalda Delgado
2016-08-13 1:16 ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 7/8] clk: fixed-factor: Convert into a module platform driver Ricardo Ribalda Delgado
2016-08-13 1:16 ` Stephen Boyd
2016-07-05 16:23 ` [PATCH v5 8/8] clk: fixed-rate: " Ricardo Ribalda Delgado
2016-08-13 1:16 ` Stephen Boyd
2018-10-18 19:20 ` Alan Tull
2018-10-18 20:02 ` Ricardo Ribalda Delgado
2018-10-18 20:25 ` Stephen Boyd
2018-10-18 20:24 ` Stephen Boyd
2018-10-18 20:33 ` Alan Tull
2016-07-18 20:19 ` [PATCH v5 0/8] clk: Don't duplicate initialization on platform_dev Ricardo Ribalda Delgado
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=1467735814-23518-2-git-send-email-ricardo.ribalda@gmail.com \
--to=ricardo.ribalda@gmail.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®