From: Rex-BC Chen <rex-bc.chen@mediatek.com>
To: <mturquette@baylibre.com>, <sboyd@kernel.org>,
<matthias.bgg@gmail.com>, <robh+dt@kernel.org>,
<krzysztof.kozlowski+dt@linaro.org>
Cc: <p.zabel@pengutronix.de>,
<angelogioacchino.delregno@collabora.com>,
<chun-jie.chen@mediatek.com>, <wenst@chromium.org>,
<runyang.chen@mediatek.com>, <linux-kernel@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-clk@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>,
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
Rex-BC Chen <rex-bc.chen@mediatek.com>
Subject: [PATCH V4 10/15] clk: mediatek: reset: Add reset support for simple probe
Date: Wed, 27 Apr 2022 11:09:45 +0800 [thread overview]
Message-ID: <20220427030950.23395-11-rex-bc.chen@mediatek.com> (raw)
In-Reply-To: <20220427030950.23395-1-rex-bc.chen@mediatek.com>
- Add a pointer of "mtk_clk_rst_desc" to "mtk_clk_desc".
- Add register reset with device function in mtk_clk_simple_probe().
Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
drivers/clk/mediatek/clk-mtk.c | 7 +++++++
drivers/clk/mediatek/clk-mtk.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index b4063261cf56..2c72e5839d50 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -453,6 +453,13 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, clk_data);
+ if (mcd->rst_desc) {
+ r = mtk_register_reset_controller_with_dev(&pdev->dev,
+ mcd->rst_desc);
+ if (r)
+ goto unregister_clks;
+ }
+
return r;
unregister_clks:
diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
index a6d0f24c62fa..2c7800bcb1a2 100644
--- a/drivers/clk/mediatek/clk-mtk.h
+++ b/drivers/clk/mediatek/clk-mtk.h
@@ -195,6 +195,7 @@ struct clk *mtk_clk_register_ref2usb_tx(const char *name,
struct mtk_clk_desc {
const struct mtk_gate *clks;
size_t num_clks;
+ const struct mtk_clk_rst_desc *rst_desc;
};
int mtk_clk_simple_probe(struct platform_device *pdev);
--
2.18.0
next prev parent reply other threads:[~2022-04-27 3:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-27 3:09 [PATCH V4 00/15] Cleanup MediaTek clk reset drivers and support MT8192/MT8195 Rex-BC Chen
2022-04-27 3:09 ` [PATCH V4 01/15] clk: mediatek: reset: Add reset.h Rex-BC Chen
2022-04-27 3:09 ` [PATCH V4 02/15] clk: mediatek: reset: Fix written reset bit offset Rex-BC Chen
2022-04-27 3:09 ` [PATCH V4 03/15] clk: mediatek: reset: Refine and reorder functions in reset.c Rex-BC Chen
2022-04-27 3:09 ` [PATCH V4 04/15] clk: mediatek: reset: Extract common drivers to update function Rex-BC Chen
2022-04-27 3:09 ` [PATCH V4 05/15] clk: mediatek: reset: Merge and revise reset register function Rex-BC Chen
2022-04-27 3:09 ` [PATCH V4 06/15] clk: mediatek: reset: Revise structure to control reset register Rex-BC Chen
2022-04-27 3:09 ` [PATCH V4 07/15] clk: mediatek: reset: Support nonsequence base offsets of reset registers Rex-BC Chen
2022-04-27 13:38 ` AngeloGioacchino Del Regno
2022-04-28 5:08 ` Rex-BC Chen
2022-04-27 3:09 ` [PATCH V4 08/15] clk: mediatek: reset: Change return type for clock reset register function Rex-BC Chen
2022-04-27 3:09 ` [PATCH V4 09/15] clk: mediatek: reset: Add new register reset function with device Rex-BC Chen
2022-04-27 3:09 ` Rex-BC Chen [this message]
2022-04-27 3:09 ` [PATCH V4 11/15] dt-bindings: arm: mediatek: Add #reset-cells property for MT8192/MT8195 Rex-BC Chen
2022-04-28 7:17 ` Krzysztof Kozlowski
2022-04-27 3:09 ` [PATCH V4 12/15] dt-bindings: reset: mediatek: Add infra_ao reset bit " Rex-BC Chen
2022-04-28 7:18 ` Krzysztof Kozlowski
2022-04-28 11:18 ` Rex-BC Chen
2022-04-27 3:09 ` [PATCH V4 13/15] clk: mediatek: reset: Add infra_ao reset support " Rex-BC Chen
2022-04-27 3:09 ` [PATCH V4 14/15] arm64: dts: mediatek: Add infra #reset-cells property for MT8192 Rex-BC Chen
2022-04-27 3:09 ` [PATCH V4 15/15] arm64: dts: mediatek: Add infra #reset-cells property for MT8195 Rex-BC Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220427030950.23395-11-rex-bc.chen@mediatek.com \
--to=rex-bc.chen@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chun-jie.chen@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=runyang.chen@mediatek.com \
--cc=sboyd@kernel.org \
--cc=wenst@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).