From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Yassine Oudjana <yassine.oudjana@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Daniel Golle <daniel@makrotopia.org>,
Allen-KH Cheng <allen-kh.cheng@mediatek.com>,
Tinghan Shen <tinghan.shen@mediatek.com>,
Chen-Yu Tsai <wenst@chromium.org>,
Edward-JW Yang <edward-jw.yang@mediatek.com>,
Johnson Wang <johnson.wang@mediatek.com>,
Fabien Parent <fparent@baylibre.com>,
Chun-Jie Chen <chun-jie.chen@mediatek.com>,
Miles Chen <miles.chen@mediatek.com>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Yassine Oudjana <y.oudjana@protonmail.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-clk@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 4/4] clk: mediatek: Add drivers for MediaTek MT6735 main clock and reset drivers
Date: Mon, 27 Feb 2023 10:28:06 +0100 [thread overview]
Message-ID: <cd634833-b28e-d6d3-692d-5a391b85ad34@collabora.com> (raw)
In-Reply-To: <20230225094246.261697-5-y.oudjana@protonmail.com>
Il 25/02/23 10:42, Yassine Oudjana ha scritto:
> From: Yassine Oudjana <y.oudjana@protonmail.com>
>
> Add drivers for MT6735 apmixedsys, topckgen, infracfg and pericfg
> clock and reset controllers. These provide the base clocks and resets
> on the platform, and should be enough to bring up all essential blocks
> including PWRAP, MSDC and peripherals (UART, I2C, SPI).
>
> Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
> ---
> MAINTAINERS | 4 +
> drivers/clk/mediatek/Kconfig | 9 +
> drivers/clk/mediatek/Makefile | 1 +
> drivers/clk/mediatek/clk-mt6735-apmixedsys.c | 139 ++++++
> drivers/clk/mediatek/clk-mt6735-infracfg.c | 78 ++++
> drivers/clk/mediatek/clk-mt6735-pericfg.c | 91 ++++
> drivers/clk/mediatek/clk-mt6735-topckgen.c | 450 +++++++++++++++++++
> 7 files changed, 772 insertions(+)
> create mode 100644 drivers/clk/mediatek/clk-mt6735-apmixedsys.c
> create mode 100644 drivers/clk/mediatek/clk-mt6735-infracfg.c
> create mode 100644 drivers/clk/mediatek/clk-mt6735-pericfg.c
> create mode 100644 drivers/clk/mediatek/clk-mt6735-topckgen.c
>
..snip..
> diff --git a/drivers/clk/mediatek/clk-mt6735-topckgen.c b/drivers/clk/mediatek/clk-mt6735-topckgen.c
> new file mode 100644
> index 000000000000..5fa743e4b0fc
> --- /dev/null
> +++ b/drivers/clk/mediatek/clk-mt6735-topckgen.c
> @@ -0,0 +1,450 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2022 Yassine Oudjana <y.oudjana@protonmail.com>
> + */
> +
> +#include <linux/clk-provider.h>
> +#include <linux/platform_device.h>
> +
> +#include "clk-mtk.h"
> +#include "clk-mux.h"
> +
> +#include <dt-bindings/clock/mediatek,mt6735-topckgen.h>
> +
..snip..
> +
> +int clk_mt6735_topckgen_probe(struct platform_device *pdev)
It gets *even easier* than that!
Check out this one:
https://patchwork.kernel.org/project/linux-mediatek/patch/20230222092543.19187-5-angelogioacchino.delregno@collabora.com/
...being part of:
https://patchwork.kernel.org/project/linux-mediatek/list/?series=724004
So you can use simple_probe for MT6735's topckgen too!
In this case, it would be...
static const struct mtk_clk_desc topck_desc = {
.clks = topckgen_muxes,
.num_clks = ARRAY_SIZE(topckgen_muxes),
.fixed_clks = topckgen_fixed_clks,
.num_fixed_clks = ARRAY_SIZE(topckgen_fixed_clks),
.factor_clks = topckgen_factors,
.num_factor_clks = ARRAY_SIZE(topckgen_factors),
.clk_lock = &mt6735_topckgen_lock,
};
static const struct of_device_id of_match_mt6735_topckgen[] = {
{ .compatible = "mediatek,mt6735-topckgen", .data = &topck_desc },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, of_match_mt6735_topckgen)
^^^^^
You're missing that on multiple clock drivers ;-)
...And you're replacing .probe(), .remove() callbacks with
static struct platform_driver clk_mt6735_topckgen = {
.probe = mtk_clk_simple_probe,
.remove = mtk_clk_simple_remove,
......
Other than that, good job!
After performing these changes, please make sure to mention the dependency on
my last cleanup series on your cover letter for v4, so that maintainers will
be aware of what to do.
Your v4 smells like Reviewed-by tags all over. Keep up the great work!
Cheers,
Angelo
next prev parent reply other threads:[~2023-02-27 9:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-25 9:42 [PATCH v3 0/4] MediaTek MT6735 main clock and reset drivers Yassine Oudjana
2023-02-25 9:42 ` [PATCH v3 1/4] dt-bindings: clock: Add MediaTek MT6735 clock bindings Yassine Oudjana
2023-02-27 8:18 ` Krzysztof Kozlowski
2023-02-27 8:29 ` Yassine Oudjana
2023-02-27 9:08 ` Krzysztof Kozlowski
2023-02-25 9:42 ` [PATCH v3 2/4] dt-bindings: reset: Add MediaTek MT6735 reset bindings Yassine Oudjana
2023-02-27 8:17 ` Krzysztof Kozlowski
2023-02-25 9:42 ` [PATCH v3 3/4] dt-bindings: arm: mediatek: Add MT6735 clock controller compatibles Yassine Oudjana
2023-02-27 8:18 ` Krzysztof Kozlowski
2023-02-25 9:42 ` [PATCH v3 4/4] clk: mediatek: Add drivers for MediaTek MT6735 main clock and reset drivers Yassine Oudjana
2023-02-25 12:05 ` kernel test robot
2023-02-27 8:19 ` Krzysztof Kozlowski
2023-02-27 9:28 ` AngeloGioacchino Del Regno [this message]
2023-02-27 10:39 ` Yassine Oudjana
2023-02-27 12:42 ` AngeloGioacchino Del Regno
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=cd634833-b28e-d6d3-692d-5a391b85ad34@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=allen-kh.cheng@mediatek.com \
--cc=bgolaszewski@baylibre.com \
--cc=chun-jie.chen@mediatek.com \
--cc=daniel@makrotopia.org \
--cc=devicetree@vger.kernel.org \
--cc=edward-jw.yang@mediatek.com \
--cc=fparent@baylibre.com \
--cc=johnson.wang@mediatek.com \
--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=miles.chen@mediatek.com \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=tinghan.shen@mediatek.com \
--cc=wenst@chromium.org \
--cc=y.oudjana@protonmail.com \
--cc=yassine.oudjana@gmail.com \
/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