[PATCH v3 54/55] clk: mediatek: mt8135: Convert to simple probe and enable module build
Chen-Yu Tsai
wenst at chromium.org
Mon Feb 20 20:00:55 PST 2023
On Mon, Feb 20, 2023 at 11:02 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno at collabora.com> wrote:
>
> Convert the MT8135 clock drivers to platform_driver using the common
> simple probe mechanism.
>
> Now that all of the MT8135 clock drivers (including apmixedsys) can
> be compiled as modules, change the COMMON_CLK_MT8135 configuration
> option to tristate to enable module build.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
> ---
> drivers/clk/mediatek/Kconfig | 2 +-
> drivers/clk/mediatek/clk-mt8135.c | 110 ++++++++++++------------------
> 2 files changed, 43 insertions(+), 69 deletions(-)
>
> diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
> index 90691261cddb..a15fbdfd3a53 100644
> --- a/drivers/clk/mediatek/Kconfig
> +++ b/drivers/clk/mediatek/Kconfig
> @@ -423,7 +423,7 @@ config COMMON_CLK_MT7986_ETHSYS
> required on MediaTek MT7986 SoC.
>
> config COMMON_CLK_MT8135
> - bool "Clock driver for MediaTek MT8135"
> + tristate "Clock driver for MediaTek MT8135"
> depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST
> select COMMON_CLK_MEDIATEK
> default ARCH_MEDIATEK && ARM
> diff --git a/drivers/clk/mediatek/clk-mt8135.c b/drivers/clk/mediatek/clk-mt8135.c
> index 8785d58cb3a5..39fd919900e5 100644
> --- a/drivers/clk/mediatek/clk-mt8135.c
> +++ b/drivers/clk/mediatek/clk-mt8135.c
> @@ -5,8 +5,10 @@
> */
>
> #include <linux/clk.h>
> +#include <linux/module.h>
> #include <linux/of.h>
> #include <linux/of_address.h>
> +#include <linux/platform_device.h>
> #include <linux/slab.h>
> #include <linux/mfd/syscon.h>
> #include <dt-bindings/clock/mt8135-clk.h>
> @@ -18,6 +20,7 @@
> static DEFINE_SPINLOCK(mt8135_clk_lock);
>
> static const struct mtk_fixed_factor top_divs[] __initconst = {
> + FACTOR(CLK_DUMMY, "top_divs_dummy", "clk_null", 1, 1),
The dummy clock stuff deserves another mention in the commit log.
Once added,
Reviewed-by: Chen-Yu Tsai <wenst at chromium.org>
More information about the Linux-mediatek
mailing list