diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-11-27 07:49:40 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-12-05 08:45:32 +0100 |
commit | cceeb917b9d205c19fd1cb39ddcc3ed94c1cd9cf (patch) | |
tree | 679254cf558bdc2ffde9e290d95ba58cfe6c10ef /include/linux | |
parent | 16994e864ffae4ce2d2f3bfffbe5c27add231c95 (diff) | |
download | barebox-cceeb917b9d205c19fd1cb39ddcc3ed94c1cd9cf.tar.gz barebox-cceeb917b9d205c19fd1cb39ddcc3ed94c1cd9cf.tar.xz |
clk: implement clk clk_hw_get_parent_by_index
This is the inverse operation to clk_get_parent_index and is already
implemented inline in clk_get_parent. Factor that code out for use by
the incoming STM32MP13 clock driver.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20231127064947.2207726-7-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/clk.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h index 269664b0ba..6a33f28ee6 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -129,6 +129,7 @@ int clk_hw_set_rate(struct clk_hw *hw, unsigned long rate); */ int clk_set_parent(struct clk *clk, struct clk *parent); int clk_hw_set_parent(struct clk_hw *hw, struct clk_hw *hwp); +struct clk_hw *clk_hw_get_parent_by_index(const struct clk_hw *hw, unsigned int idx); /** * clk_get_parent - get the parent clock source for this clock |