summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-06-02 11:55:04 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-06-08 08:38:25 +0200
commit3041f8fea28b2e339f044c1b9d1fa784a5153c5e (patch)
tree951dedd1fe0706d6ecd0dfa854eac1a06dfc20d0 /include
parent2d5f1eb391b2a66546236e92f60076fc76360a90 (diff)
downloadbarebox-3041f8fea28b2e339f044c1b9d1fa784a5153c5e.tar.gz
barebox-3041f8fea28b2e339f044c1b9d1fa784a5153c5e.tar.xz
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 <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210602095507.24609-22-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/clk.h5
1 files changed, 5 insertions, 0 deletions
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);
};
/**