Skip to content

Commit ee58d6a

Browse files
SiFiveHollandbebarino
authored andcommitted
clk: analogbits: Allow building the library as a module
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 0bb80ec commit ee58d6a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

drivers/clk/analogbits/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
config CLK_ANALOGBITS_WRPLL_CLN28HPC
3-
bool
3+
tristate

drivers/clk/analogbits/wrpll-cln28hpc.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <linux/math64.h>
2929
#include <linux/math.h>
3030
#include <linux/minmax.h>
31+
#include <linux/module.h>
3132

3233
#include <linux/clk/analogbits-wrpll-cln28hpc.h>
3334

@@ -312,6 +313,7 @@ int wrpll_configure_for_rate(struct wrpll_cfg *c, u32 target_rate,
312313

313314
return 0;
314315
}
316+
EXPORT_SYMBOL_GPL(wrpll_configure_for_rate);
315317

316318
/**
317319
* 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,
349351

350352
return n;
351353
}
354+
EXPORT_SYMBOL_GPL(wrpll_calc_output_rate);
352355

353356
/**
354357
* 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)
366369
{
367370
return MAX_LOCK_US;
368371
}
372+
EXPORT_SYMBOL_GPL(wrpll_calc_max_lock_us);
373+
374+
MODULE_AUTHOR("Paul Walmsley <[email protected]>");
375+
MODULE_DESCRIPTION("Analog Bits Wide-Range PLL library");
376+
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)