clk: starfive: Make _clk_get become a common helper function
authorChanghuang Liang <changhuang.liang@starfivetech.com>
Tue, 14 Jan 2025 08:13:00 +0000 (00:13 -0800)
committerStephen Boyd <sboyd@kernel.org>
Tue, 14 Jan 2025 18:55:00 +0000 (10:55 -0800)
commit838c0a41d7ed892de85329c199ac604611f8efe7
treee15a6681d9594a05cba3fdbca579dcc324e362a9
parent900360094903e47e836bd2be3b344a82f190ec51
clk: starfive: Make _clk_get become a common helper function

Introduce num_reg to store the number of clocks, this helps to make
_clk_get become a common helper function which called jh71x0_clk_get().
With this, it helps to simplify the code and extend the code in the
future.

Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
Link: https://lore.kernel.org/r/20250114081300.36600-1-changhuang.liang@starfivetech.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/starfive/clk-starfive-jh7100-audio.c
drivers/clk/starfive/clk-starfive-jh7110-aon.c
drivers/clk/starfive/clk-starfive-jh7110-isp.c
drivers/clk/starfive/clk-starfive-jh7110-stg.c
drivers/clk/starfive/clk-starfive-jh7110-sys.c
drivers/clk/starfive/clk-starfive-jh7110-vout.c
drivers/clk/starfive/clk-starfive-jh71x0.c
drivers/clk/starfive/clk-starfive-jh71x0.h