clk: samsung: allow building the clkout driver as module
authorKrzysztof Kozlowski <krzk@kernel.org>
Tue, 10 Nov 2020 19:37:49 +0000 (20:37 +0100)
committerKrzysztof Kozlowski <krzk@kernel.org>
Thu, 12 Nov 2020 16:18:40 +0000 (17:18 +0100)
The Exynos clock output driver can be built as module (it does not have
to be part of core init process) for better customization.  Adding a
KConfig entry allows also compile testing for build coverage.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20201110193749.261367-1-krzk@kernel.org
drivers/clk/samsung/Kconfig
drivers/clk/samsung/Makefile
drivers/clk/samsung/clk-exynos-clkout.c

index 57d4b3f20417fd994ecf5173b90d6eceb9567673..7e9c186e57efbdea95cde0d8cb85f2b0b3ed3f5f 100644 (file)
@@ -19,6 +19,16 @@ config EXYNOS_AUDSS_CLK_CON
          on some Exynos SoC variants. Choose M or Y here if you want to
          use audio devices such as I2S, PCM, etc.
 
+config EXYNOS_CLKOUT
+       tristate "Samsung Exynos clock output driver"
+       depends on COMMON_CLK_SAMSUNG
+       default y if ARCH_EXYNOS
+       help
+         Support for the clock output (XCLKOUT) present on some of Exynos SoC
+         variants. Usually the XCLKOUT is used to monitor the status of the
+         certains clocks from SoC, but it could also be tied to other devices
+         as an input clock.
+
 # For S3C24XX platforms, select following symbols:
 config S3C2410_COMMON_CLK
        bool "Samsung S3C2410 clock controller support" if COMPILE_TEST
index 1a4e6b787978383ba44252a9e70cb587dea659fa..6891b087acff26fee30342289fe559ee3931b8e8 100644 (file)
@@ -15,7 +15,7 @@ obj-$(CONFIG_SOC_EXYNOS5420)  += clk-exynos5420.o
 obj-$(CONFIG_SOC_EXYNOS5420)   += clk-exynos5-subcmu.o
 obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK)  += clk-exynos5433.o
 obj-$(CONFIG_EXYNOS_AUDSS_CLK_CON) += clk-exynos-audss.o
-obj-$(CONFIG_ARCH_EXYNOS)      += clk-exynos-clkout.o
+obj-$(CONFIG_EXYNOS_CLKOUT)    += clk-exynos-clkout.o
 obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK)  += clk-exynos7.o
 obj-$(CONFIG_S3C2410_COMMON_CLK)+= clk-s3c2410.o
 obj-$(CONFIG_S3C2410_COMMON_DCLK)+= clk-s3c2410-dclk.o
index f5f8a956b316a0eda979edcda2863e332e1b4784..9ec2f40cc400bd0dd01d1d725170a811a8a2ccb2 100644 (file)
@@ -72,6 +72,7 @@ static const struct of_device_id exynos_clkout_ids[] = {
                .data = &exynos_clkout_exynos5,
        }, { }
 };
+MODULE_DEVICE_TABLE(of, exynos_clkout_ids);
 
 /*
  * Device will be instantiated as child of PMU device without its own