From 3041f8fea28b2e339f044c1b9d1fa784a5153c5e Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 2 Jun 2021 11:55:04 +0200 Subject: clk: implement set/get phase Linux has clk_set_phase() and clk_get_phase() along with the corresponding callbacks in struct clk_ops. Implement the same for barebox as well. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210602095507.24609-22-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer --- include/linux/clk.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/linux/clk.h b/include/linux/clk.h index 72971c8e27..6b4c368231 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -237,6 +237,9 @@ int clk_hw_set_parent(struct clk_hw *hw, struct clk_hw *hwp); struct clk *clk_get_parent(struct clk *clk); struct clk_hw *clk_hw_get_parent(struct clk_hw *hw); +int clk_set_phase(struct clk *clk, int degrees); +int clk_get_phase(struct clk *clk); + /** * clk_get_sys - get a clock based upon the device name * @dev_id: device name @@ -356,6 +359,8 @@ struct clk_ops { int (*get_parent)(struct clk_hw *hw); int (*set_rate)(struct clk_hw *hw, unsigned long, unsigned long); + int (*set_phase)(struct clk_hw *hw, int degrees); + int (*get_phase)(struct clk_hw *hw); }; /** -- cgit v1.2.3