From: Chen-Yu Tsai <wenst@chromium.org>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Chun-Jie Chen <chun-jie.chen@mediatek.com>,
Miles Chen <miles.chen@mediatek.com>,
Rex-BC Chen <rex-bc.chen@mediatek.com>
Cc: Chen-Yu Tsai <wenst@chromium.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-clk@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [RFC PATCH 7/7] clk: mediatek: mt8173: Switch to clk_hw provider APIs
Date: Tue, 19 Apr 2022 16:12:46 +0800 [thread overview]
Message-ID: <20220419081246.2546159-8-wenst@chromium.org> (raw)
In-Reply-To: <20220419081246.2546159-1-wenst@chromium.org>
As part of the effort to improve the MediaTek clk drivers, the next step
is to switch from the old 'struct clk' clk prodivder APIs to the new
'struct clk_hw' ones.
The MT8173 clk driver has one clk that is registered directly with the
clk provider APIs, instead of going through the MediaTek clk library.
Switch this instance to use the clk_hw provider API.
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
drivers/clk/mediatek/clk-mt8173.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/mediatek/clk-mt8173.c b/drivers/clk/mediatek/clk-mt8173.c
index 68d3a9749316..d34b248c42ca 100644
--- a/drivers/clk/mediatek/clk-mt8173.c
+++ b/drivers/clk/mediatek/clk-mt8173.c
@@ -994,7 +994,6 @@ static void __init mtk_apmixedsys_init(struct device_node *node)
struct clk_hw_onecell_data *clk_data;
void __iomem *base;
struct clk_hw *hw;
- struct clk *clk;
int r, i;
base = of_iomap(node, 0);
@@ -1023,10 +1022,10 @@ static void __init mtk_apmixedsys_init(struct device_node *node)
clk_data->hws[cku->id] = hw;
}
- clk = clk_register_divider(NULL, "hdmi_ref", "tvdpll_594m", 0,
- base + 0x40, 16, 3, CLK_DIVIDER_POWER_OF_TWO,
- NULL);
- clk_data->hws[CLK_APMIXED_HDMI_REF] = __clk_get_hw(clk);
+ hw = clk_hw_register_divider(NULL, "hdmi_ref", "tvdpll_594m", 0,
+ base + 0x40, 16, 3, CLK_DIVIDER_POWER_OF_TWO,
+ NULL);
+ clk_data->hws[CLK_APMIXED_HDMI_REF] = hw;
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
if (r)
--
2.36.0.rc0.470.gd361397f0d-goog
next prev parent reply other threads:[~2022-04-19 8:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-19 8:12 [RFC PATCH 0/7] clk: mediatek: Move to struct clk_hw provider APIs Chen-Yu Tsai
2022-04-19 8:12 ` [RFC PATCH 1/7] clk: mediatek: Make mtk_clk_register_composite() static Chen-Yu Tsai
2022-04-19 14:45 ` AngeloGioacchino Del Regno
2022-04-19 8:12 ` [RFC PATCH 2/7] clk: mediatek: apmixed: Drop error message from clk_register() failure Chen-Yu Tsai
2022-04-19 8:12 ` [RFC PATCH 3/7] clk: mediatek: Convert mtk_{alloc,free}_clk_data to struct clk_hw Chen-Yu Tsai
2022-04-19 8:12 ` [RFC PATCH 5/7] clk: mediatek: Switch to clk_hw provider APIs Chen-Yu Tsai
2022-04-19 8:12 ` [RFC PATCH 6/7] clk: mediatek: mt8173: Fix usage of mtk_clk_register_ref2usb_tx() Chen-Yu Tsai
2022-04-19 8:12 ` Chen-Yu Tsai [this message]
2022-04-19 15:08 ` [RFC PATCH 0/7] clk: mediatek: Move to struct clk_hw provider APIs AngeloGioacchino Del Regno
2022-04-19 16:09 ` Chen-Yu Tsai
2022-04-20 12:02 ` AngeloGioacchino Del Regno
2022-04-21 6:05 ` Chen-Yu Tsai
2022-04-21 9:42 ` AngeloGioacchino Del Regno
2022-04-22 1:40 ` Stephen Boyd
2022-04-22 4:14 ` Chen-Yu Tsai
2022-05-03 16:28 ` Chen-Yu Tsai
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=20220419081246.2546159-8-wenst@chromium.org \
--to=wenst@chromium.org \
--cc=chun-jie.chen@mediatek.com \
--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=miles.chen@mediatek.com \
--cc=mturquette@baylibre.com \
--cc=rex-bc.chen@mediatek.com \
--cc=sboyd@kernel.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