Re: [PATCH v2 44/47] clk: mediatek: Split configuration options for MT8186 clock drivers

From: Chen-Yu Tsai
Date: Fri Feb 17 2023 - 02:39:00 EST


On Tue, Feb 14, 2023 at 9:42 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@xxxxxxxxxxxxx> wrote:
>
> When building clock drivers for MT8186, some may want to build in only
> some of them to, for example, get CPUFreq up faster, and some may want
> to leave out some clock drivers entirely as a machine may not need the
> Warp Engine or the camera ISP (hence, their clock drivers).
>
> Split the various clock drivers in their own configuration options,
> keeping MT8186 configuration options consistent with other MediaTek
> SoCs.
>
> While at it, also allow building the remaining clock drivers as modules
> by switching COMMON_CLK_MT8186 to tristate.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
> ---
> drivers/clk/mediatek/Kconfig | 68 ++++++++++++++++++++++++++++++++++-
> drivers/clk/mediatek/Makefile | 18 +++++++---
> 2 files changed, 80 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
> index 1497171a65ef..706a7cf86ce0 100644
> --- a/drivers/clk/mediatek/Kconfig
> +++ b/drivers/clk/mediatek/Kconfig
> @@ -596,7 +596,7 @@ config COMMON_CLK_MT8183_VENCSYS
> This driver supports MediaTek MT8183 vencsys clocks.
>
> config COMMON_CLK_MT8186
> - bool "Clock driver for MediaTek MT8186"
> + tristate "Clock driver for MediaTek MT8186"
> depends on ARM64 || COMPILE_TEST
> select COMMON_CLK_MEDIATEK
> select COMMON_CLK_MEDIATEK_FHCTL
> @@ -604,6 +604,72 @@ config COMMON_CLK_MT8186
> help
> This driver supports MediaTek MT8186 clocks.
>
> +config COMMON_CLK_MT8186_CAMSYS
> + tristate "Clock driver for MediaTek MT8186 camsys"
> + depends on COMMON_CLK_MT8186
> + help
> + This driver supports MediaTek MT8186 camsys and camsys_raw clocks.
> +
> +config COMMON_CLK_MT8186_IMGSYS
> + tristate "Clock driver for MediaTek MT8186 imgsys"
> + depends on COMMON_CLK_MT8186
> + help
> + This driver supports MediaTek MT8186 imgsys and imgsys2 clocks.
> +
> +config COMMON_CLK_MT8186_IMP_IIC_WRAP
> + tristate "Clock driver for MediaTek MT8186 imp_iic_wrap"
> + depends on COMMON_CLK_MT8186
> + help
> + This driver supports MediaTek MT8186 imp_iic_wrap clocks.
> +
> +config COMMON_CLK_MT8186_IPESYS
> + tristate "Clock driver for MediaTek MT8186 ipesys"
> + depends on COMMON_CLK_MT8186_IMGSYS

Same comments as MT8195 about the ordering and mentioning dependency
reasoning in the commit log.

ChenYu