[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220418132154.7401-7-rex-bc.chen@mediatek.com>
Date: Mon, 18 Apr 2022 21:21:53 +0800
From: Rex-BC Chen <rex-bc.chen@...iatek.com>
To: <mturquette@...libre.com>, <sboyd@...nel.org>
CC: <matthias.bgg@...il.com>, <p.zabel@...gutronix.de>,
<angelogioacchino.delregno@...labora.com>,
<chun-jie.chen@...iatek.com>, <wenst@...omium.org>,
<yong.liang@...iatek.com>, <runyang.chen@...iatek.com>,
<linux-kernel@...r.kernel.org>, <allen-kh.cheng@...iatek.com>,
<linux-clk@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<Project_Global_Chrome_Upstream_Group@...iatek.com>,
Rex-BC Chen <rex-bc.chen@...iatek.com>
Subject: [PATCH 6/7] clk: mediatek: reset: Add support for unregister reset controller
Add a function to unregister reset controller.
Signed-off-by: Rex-BC Chen <rex-bc.chen@...iatek.com>
---
drivers/clk/mediatek/reset.c | 10 ++++++++++
drivers/clk/mediatek/reset.h | 2 ++
2 files changed, 12 insertions(+)
diff --git a/drivers/clk/mediatek/reset.c b/drivers/clk/mediatek/reset.c
index 709ae54efc18..19f7ac0f8145 100644
--- a/drivers/clk/mediatek/reset.c
+++ b/drivers/clk/mediatek/reset.c
@@ -138,4 +138,14 @@ int mtk_clk_register_rst_ctrl(struct device_node *np,
return 0;
}
+int mtk_clk_unregister_rst_ctrl(struct mtk_clk_rst_data *clk_rst)
+{
+ if (!clk_rst)
+ return -EINVAL;
+
+ reset_controller_unregister(&clk_rst->rcdev);
+
+ return 0;
+}
+
MODULE_LICENSE("GPL");
diff --git a/drivers/clk/mediatek/reset.h b/drivers/clk/mediatek/reset.h
index 851a29c92440..86a785630bb6 100644
--- a/drivers/clk/mediatek/reset.h
+++ b/drivers/clk/mediatek/reset.h
@@ -27,4 +27,6 @@ struct mtk_clk_rst_data {
int mtk_clk_register_rst_ctrl(struct device_node *np,
struct mtk_clk_rst_data *clk_rst);
+int mtk_clk_unregister_rst_ctrl(struct mtk_clk_rst_data *clk_rst);
+
#endif /* __DRV_CLK_MTK_RESET_H */
--
2.18.0
Powered by blists - more mailing lists