diff mbox series

[U-Boot,v5,07/18] clk: Introduce clk-provider.h to store Common Clock Framework's internals

Message ID 20190624135052.2699-8-lukma@denx.de
State Accepted
Commit 004c1229414ff4a13dd20f48f9c8c1da98fee878
Delegated to: Stefano Babic
Headers show
Series clk: Port Linux common clock framework [CCF] to U-boot (tag: v5.1.12) | expand

Commit Message

Lukasz Majewski June 24, 2019, 1:50 p.m. UTC
This file now stores the dev_get_clk_ptr() wrapper on the dev_get_uclass_priv()
function.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None

 include/linux/clk-provider.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 include/linux/clk-provider.h

Comments

Stefano Babic July 20, 2019, 8:45 a.m. UTC | #1
> This file now stores the dev_get_clk_ptr() wrapper on the dev_get_uclass_priv()
> function.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
new file mode 100644
index 0000000000..6adf0a5791
--- /dev/null
+++ b/include/linux/clk-provider.h
@@ -0,0 +1,16 @@ 
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2019 DENX Software Engineering
+ * Lukasz Majewski, DENX Software Engineering, lukma@denx.de
+ *
+ * Copyright (c) 2010-2011 Jeremy Kerr <jeremy.kerr@canonical.com>
+ * Copyright (C) 2011-2012 Linaro Ltd <mturquette@linaro.org>
+ */
+#ifndef __LINUX_CLK_PROVIDER_H
+#define __LINUX_CLK_PROVIDER_H
+
+static inline struct clk *dev_get_clk_ptr(struct udevice *dev)
+{
+	return (struct clk *)dev_get_uclass_priv(dev);
+}
+#endif /* __LINUX_CLK_PROVIDER_H */