summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-06-21 11:27:51 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-06-21 13:11:57 +0200
commit44e5dc29f90a3ed578fce11cae047a6f38ece066 (patch)
treeda159009036d7d99b78e246211cab624da4041b7 /include
parent30a5e60e7d23fba9c5c12ff93c022a6c236dd01f (diff)
downloadbarebox-44e5dc29f90a3ed578fce11cae047a6f38ece066.tar.gz
barebox-44e5dc29f90a3ed578fce11cae047a6f38ece066.tar.xz
clk: Add clk_name_* functions
At some places a clk name may be known without having a struct clk * directly. Add some convenience functions to handle this situation and use them in the clk commands. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210615141641.31577-2-s.hauer@pengutronix.de Link: https://lore.barebox.org/20210621092802.27275-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/clk.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h
index e54acdd918..6565429a9b 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -681,6 +681,9 @@ static inline const char *clk_hw_get_name(struct clk_hw *hw)
return hw->clk.name;
}
+int clk_name_set_parent(const char *clkname, const char *clkparentname);
+int clk_name_set_rate(const char *clkname, unsigned long rate);
+
#endif
struct device_node;
@@ -722,6 +725,7 @@ static inline unsigned int clk_get_num_parents(const struct clk *hw)
{
return hw->num_parents;
}
+
#else