]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
clk: clk-mux: Make public the clk_fetch_parent_index
authorMichael Trimarchi <michael@amarulasolutions.com>
Fri, 5 Jul 2024 07:19:51 +0000 (09:19 +0200)
committerFabio Estevam <festevam@gmail.com>
Sat, 6 Jul 2024 18:39:22 +0000 (15:39 -0300)
Make public the clk_fetch_parent_index and rename it. This allow
us to be reused in driver specialization

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
drivers/clk/clk-mux.c
include/linux/clk-provider.h

index 39e01c3fbc61c85e49a8a8ba1ccd253544d84a79..62477e15d27ae09e59d1732d90c1339afc1be826 100644 (file)
@@ -101,8 +101,7 @@ u8 clk_mux_get_parent(struct clk *clk)
        return clk_mux_val_to_index(clk, mux->table, mux->flags, val);
 }
 
-static int clk_fetch_parent_index(struct clk *clk,
-                                 struct clk *parent)
+int clk_mux_fetch_parent_index(struct clk *clk, struct clk *parent)
 {
        struct clk_mux *mux = to_clk_mux(clk);
 
@@ -126,7 +125,7 @@ static int clk_mux_set_parent(struct clk *clk, struct clk *parent)
        u32 val;
        u32 reg;
 
-       index = clk_fetch_parent_index(clk, parent);
+       index = clk_mux_fetch_parent_index(clk, parent);
        if (index < 0) {
                log_err("Could not fetch index\n");
                return index;
index b8acacd49ee59195f7eb840572636a4214f547cb..59f9c241b846e7f6d3f0eea16bd274fa81bab386 100644 (file)
@@ -74,6 +74,7 @@ struct clk_mux {
 #define to_clk_mux(_clk) container_of(_clk, struct clk_mux, clk)
 extern const struct clk_ops clk_mux_ops;
 u8 clk_mux_get_parent(struct clk *clk);
+int clk_mux_fetch_parent_index(struct clk *clk, struct clk *parent);
 
 /**
  * clk_mux_index_to_val() - Convert the parent index to the register value