]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
clk: analogbits: Allow building the library as a module
authorSamuel Holland <samuel.holland@sifive.com>
Tue, 25 Jul 2023 00:42:47 +0000 (17:42 -0700)
committerStephen Boyd <sboyd@kernel.org>
Tue, 24 Oct 2023 03:26:49 +0000 (20:26 -0700)
This library is only used by the SiFive PRCI driver. When that driver is
built as a module, it makes sense to build this library as a module too.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20230725004248.381868-1-samuel.holland@sifive.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/analogbits/Kconfig
drivers/clk/analogbits/wrpll-cln28hpc.c

index 1e291b185438482b33a964a99501f2e2a506a2a5..7d73db0fcd49033cf2bc9f091b419ba1f9eb9d19 100644 (file)
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config CLK_ANALOGBITS_WRPLL_CLN28HPC
-       bool
+       tristate
index 09ca82356399301ccd7e165bc357271dfec532cf..65d422a588e1f1af91f2d610c178f0f4fe5616af 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/math64.h>
 #include <linux/math.h>
 #include <linux/minmax.h>
+#include <linux/module.h>
 
 #include <linux/clk/analogbits-wrpll-cln28hpc.h>
 
@@ -312,6 +313,7 @@ int wrpll_configure_for_rate(struct wrpll_cfg *c, u32 target_rate,
 
        return 0;
 }
+EXPORT_SYMBOL_GPL(wrpll_configure_for_rate);
 
 /**
  * wrpll_calc_output_rate() - calculate the PLL's target output rate
@@ -349,6 +351,7 @@ unsigned long wrpll_calc_output_rate(const struct wrpll_cfg *c,
 
        return n;
 }
+EXPORT_SYMBOL_GPL(wrpll_calc_output_rate);
 
 /**
  * wrpll_calc_max_lock_us() - return the time for the PLL to lock
@@ -366,3 +369,8 @@ unsigned int wrpll_calc_max_lock_us(const struct wrpll_cfg *c)
 {
        return MAX_LOCK_US;
 }
+EXPORT_SYMBOL_GPL(wrpll_calc_max_lock_us);
+
+MODULE_AUTHOR("Paul Walmsley <paul.walmsley@sifive.com>");
+MODULE_DESCRIPTION("Analog Bits Wide-Range PLL library");
+MODULE_LICENSE("GPL");