Skip to content

Commit 32b028f

Browse files
milesdotchenbebarino
authored andcommitted
clk: mediatek: support COMMON_CLK_MEDIATEK module build
To support COMMON_CLK_MEDIATEK module build, add MODULE_LICENSE and export necessary symbols. Cc: Stephen Boyd <[email protected]> Cc: Hanks Chen <[email protected]> Cc: Wendell Lin <[email protected]> Cc: Lee Jones <[email protected]> Signed-off-by: Miles Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 7c97169 commit 32b028f

File tree

8 files changed

+33
-1
lines changed

8 files changed

+33
-1
lines changed

drivers/clk/mediatek/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ menu "Clock driver for MediaTek SoC"
66
depends on ARCH_MEDIATEK || COMPILE_TEST
77

88
config COMMON_CLK_MEDIATEK
9-
bool
9+
tristate
1010
select RESET_CONTROLLER
1111
help
1212
MediaTek SoCs' clock support.

drivers/clk/mediatek/clk-apmixed.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
#include <linux/delay.h>
8+
#include <linux/module.h>
89
#include <linux/of_address.h>
910
#include <linux/slab.h>
1011

@@ -97,3 +98,5 @@ struct clk * __init mtk_clk_register_ref2usb_tx(const char *name,
9798

9899
return clk;
99100
}
101+
102+
MODULE_LICENSE("GPL");

drivers/clk/mediatek/clk-cpumux.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <linux/clk-provider.h>
88
#include <linux/mfd/syscon.h>
9+
#include <linux/module.h>
910
#include <linux/slab.h>
1011

1112
#include "clk-mtk.h"
@@ -106,3 +107,5 @@ int mtk_clk_register_cpumuxes(struct device_node *node,
106107

107108
return 0;
108109
}
110+
111+
MODULE_LICENSE("GPL");

drivers/clk/mediatek/clk-gate.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/slab.h>
1212
#include <linux/delay.h>
1313
#include <linux/clkdev.h>
14+
#include <linux/module.h>
1415

1516
#include "clk-mtk.h"
1617
#include "clk-gate.h"
@@ -122,24 +123,28 @@ const struct clk_ops mtk_clk_gate_ops_setclr = {
122123
.enable = mtk_cg_enable,
123124
.disable = mtk_cg_disable,
124125
};
126+
EXPORT_SYMBOL_GPL(mtk_clk_gate_ops_setclr);
125127

126128
const struct clk_ops mtk_clk_gate_ops_setclr_inv = {
127129
.is_enabled = mtk_cg_bit_is_set,
128130
.enable = mtk_cg_enable_inv,
129131
.disable = mtk_cg_disable_inv,
130132
};
133+
EXPORT_SYMBOL_GPL(mtk_clk_gate_ops_setclr_inv);
131134

132135
const struct clk_ops mtk_clk_gate_ops_no_setclr = {
133136
.is_enabled = mtk_cg_bit_is_cleared,
134137
.enable = mtk_cg_enable_no_setclr,
135138
.disable = mtk_cg_disable_no_setclr,
136139
};
140+
EXPORT_SYMBOL_GPL(mtk_clk_gate_ops_no_setclr);
137141

138142
const struct clk_ops mtk_clk_gate_ops_no_setclr_inv = {
139143
.is_enabled = mtk_cg_bit_is_set,
140144
.enable = mtk_cg_enable_inv_no_setclr,
141145
.disable = mtk_cg_disable_inv_no_setclr,
142146
};
147+
EXPORT_SYMBOL_GPL(mtk_clk_gate_ops_no_setclr_inv);
143148

144149
struct clk *mtk_clk_register_gate(
145150
const char *name,
@@ -181,3 +186,6 @@ struct clk *mtk_clk_register_gate(
181186

182187
return clk;
183188
}
189+
EXPORT_SYMBOL_GPL(mtk_clk_register_gate);
190+
191+
MODULE_LICENSE("GPL");

drivers/clk/mediatek/clk-mtk.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/slab.h>
1212
#include <linux/delay.h>
1313
#include <linux/clkdev.h>
14+
#include <linux/module.h>
1415
#include <linux/mfd/syscon.h>
1516
#include <linux/device.h>
1617
#include <linux/of_device.h>
@@ -42,6 +43,7 @@ struct clk_onecell_data *mtk_alloc_clk_data(unsigned int clk_num)
4243

4344
return NULL;
4445
}
46+
EXPORT_SYMBOL_GPL(mtk_alloc_clk_data);
4547

4648
void mtk_free_clk_data(struct clk_onecell_data *clk_data)
4749
{
@@ -77,6 +79,7 @@ void mtk_clk_register_fixed_clks(const struct mtk_fixed_clk *clks,
7779
clk_data->clks[rc->id] = clk;
7880
}
7981
}
82+
EXPORT_SYMBOL_GPL(mtk_clk_register_fixed_clks);
8083

8184
void mtk_clk_register_factors(const struct mtk_fixed_factor *clks,
8285
int num, struct clk_onecell_data *clk_data)
@@ -103,6 +106,7 @@ void mtk_clk_register_factors(const struct mtk_fixed_factor *clks,
103106
clk_data->clks[ff->id] = clk;
104107
}
105108
}
109+
EXPORT_SYMBOL_GPL(mtk_clk_register_factors);
106110

107111
int mtk_clk_register_gates_with_dev(struct device_node *node,
108112
const struct mtk_gate *clks,
@@ -155,6 +159,7 @@ int mtk_clk_register_gates(struct device_node *node,
155159
return mtk_clk_register_gates_with_dev(node,
156160
clks, num, clk_data, NULL);
157161
}
162+
EXPORT_SYMBOL_GPL(mtk_clk_register_gates);
158163

159164
struct clk *mtk_clk_register_composite(const struct mtk_composite *mc,
160165
void __iomem *base, spinlock_t *lock)
@@ -268,6 +273,7 @@ void mtk_clk_register_composites(const struct mtk_composite *mcs,
268273
clk_data->clks[mc->id] = clk;
269274
}
270275
}
276+
EXPORT_SYMBOL_GPL(mtk_clk_register_composites);
271277

272278
void mtk_clk_register_dividers(const struct mtk_clk_divider *mcds,
273279
int num, void __iomem *base, spinlock_t *lock,
@@ -326,3 +332,5 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
326332
mtk_free_clk_data(clk_data);
327333
return r;
328334
}
335+
336+
MODULE_LICENSE("GPL");

drivers/clk/mediatek/clk-mux.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/of_address.h>
99
#include <linux/slab.h>
1010
#include <linux/mfd/syscon.h>
11+
#include <linux/module.h>
1112

1213
#include "clk-mtk.h"
1314
#include "clk-mux.h"
@@ -195,3 +196,6 @@ int mtk_clk_register_muxes(const struct mtk_mux *muxes,
195196

196197
return 0;
197198
}
199+
EXPORT_SYMBOL_GPL(mtk_clk_register_muxes);
200+
201+
MODULE_LICENSE("GPL");

drivers/clk/mediatek/clk-pll.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <linux/of.h>
88
#include <linux/of_address.h>
99
#include <linux/io.h>
10+
#include <linux/module.h>
1011
#include <linux/slab.h>
1112
#include <linux/clkdev.h>
1213
#include <linux/delay.h>
@@ -385,3 +386,6 @@ void mtk_clk_register_plls(struct device_node *node,
385386
clk_data->clks[pll->id] = clk;
386387
}
387388
}
389+
EXPORT_SYMBOL_GPL(mtk_clk_register_plls);
390+
391+
MODULE_LICENSE("GPL");

drivers/clk/mediatek/reset.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,5 @@ void mtk_register_reset_controller_set_clr(struct device_node *np,
137137
mtk_register_reset_controller_common(np, num_regs, regofs,
138138
&mtk_reset_ops_set_clr);
139139
}
140+
141+
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)