summaryrefslogtreecommitdiff
path: root/drivers/clk/clk.h
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@kernel.org>2018-12-11 19:34:16 +0300
committerStephen Boyd <sboyd@kernel.org>2019-03-01 22:17:22 +0300
commitefa850487a6b6742699e3352d8562f5aba531ae7 (patch)
tree44515c79e2a05d5602cfbade81753302222a5c86 /drivers/clk/clk.h
parent4472287a3b2f52f4aa53f294ccb74392dde4e07d (diff)
downloadlinux-efa850487a6b6742699e3352d8562f5aba531ae7.tar.xz
clk: Inform the core about consumer devices
We'd like to have a pointer to the device that's consuming a particular clk in the clk framework so we can link the consumer to the clk provider with a PM device link. Add a device argument to clk_hw_create_clk() for this so it can be used in subsequent patches to add and remove the link. Cc: Miquel Raynal <miquel.raynal@bootlin.com> Cc: Jerome Brunet <jbrunet@baylibre.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Jeffrey Hugo <jhugo@codeaurora.org> Cc: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/clk.h')
-rw-r--r--drivers/clk/clk.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/clk/clk.h b/drivers/clk/clk.h
index 5a0ca0e3c1f1..5ea2185e57a1 100644
--- a/drivers/clk/clk.h
+++ b/drivers/clk/clk.h
@@ -5,6 +5,8 @@
*/
struct clk_hw;
+struct device;
+struct of_phandle_args;
#if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK)
int of_parse_clkspec(const struct device_node *np, int index, const char *name,
@@ -13,13 +15,14 @@ struct clk_hw *of_clk_get_hw_from_clkspec(struct of_phandle_args *clkspec);
#endif
#ifdef CONFIG_COMMON_CLK
-struct clk *clk_hw_create_clk(struct clk_hw *hw,
+struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
const char *dev_id, const char *con_id);
void __clk_put(struct clk *clk);
#else
/* All these casts to avoid ifdefs in clkdev... */
static inline struct clk *
-clk_hw_create_clk(struct clk_hw *hw, const char *dev_id, const char *con_id)
+clk_hw_create_clk(struct device *dev, struct clk_hw *hw, const char *dev_id,
+ const char *con_id)
{
return (struct clk *)hw;
}