diff options
author | Dong Aisheng <aisheng.dong@nxp.com> | 2020-07-29 10:00:15 +0200 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2020-10-26 03:54:00 +0100 |
commit | d5f1e6a2bb61db8d4bd269edac8b52a853b48ce8 (patch) | |
tree | f6c88cda9daae4423194499d89caa647f45d4033 /drivers/clk/imx/clk-lpcg-scu.c | |
parent | clk: imx: scu: add suspend/resume support (diff) | |
download | linux-d5f1e6a2bb61db8d4bd269edac8b52a853b48ce8.tar.xz linux-d5f1e6a2bb61db8d4bd269edac8b52a853b48ce8.zip |
clk: imx: imx8qxp-lpcg: add parsing clocks from device tree
One LPCG controller supports up to 8 clock outputs while each of them
is fixed to 4 bits. It supports only gating function with fixed bits.
So we can use the clk-indices to fetch the corresponding clock idx from
device tree. With this way, we can write a generic LPCG clock drivers.
This patch add that support to parse clocks from device tree.
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Michael Turquette <mturquette@baylibre.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'drivers/clk/imx/clk-lpcg-scu.c')
-rw-r--r-- | drivers/clk/imx/clk-lpcg-scu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/clk/imx/clk-lpcg-scu.c b/drivers/clk/imx/clk-lpcg-scu.c index 1f0e44f921ae..fab9c94a5e69 100644 --- a/drivers/clk/imx/clk-lpcg-scu.c +++ b/drivers/clk/imx/clk-lpcg-scu.c @@ -115,3 +115,11 @@ struct clk_hw *imx_clk_lpcg_scu(const char *name, const char *parent_name, return hw; } + +void imx_clk_lpcg_scu_unregister(struct clk_hw *hw) +{ + struct clk_lpcg_scu *clk = to_clk_lpcg_scu(hw); + + clk_hw_unregister(&clk->hw); + kfree(clk); +} |