clk: spacemit: Fix module build for spacemit common ccu driver
Subsystems (3)
PATCH 1/1 clk: spacemit: Fix module build for spacemit common ccu driver
For build spacemit common clock driver as a module, the build process require MODULE_LICENSE()/MODULE_DESCRIPTION() globally and EXPORT_SYMBOL() for every exposed symbol. Otherwise, the build will fail.
Add these missing hints, so the driver can be built as a module.
--- drivers/clk/spacemit/ccu_ddn.c | 1 + drivers/clk/spacemit/ccu_mix.c | 9 +++++++++ drivers/clk/spacemit/ccu_pll.c | 5 +++++ 3 files changed, 15 insertions(+)
drivers/clk/spacemit/ccu_ddn.c +1 -0
@@ -84,3 +84,4 @@ const struct clk_ops spacemit_ccu_ddn_ops = { .determine_rate = ccu_ddn_determine_rate, .set_rate = ccu_ddn_set_rate, }; +EXPORT_SYMBOL (spacemit_ccu_ddn_ops);
drivers/clk/spacemit/ccu_mix.c +9 -0
@@ -198,24 +198,28 @@ const struct clk_ops spacemit_ccu_gate_ops = { .enable = ccu_gate_enable, .is_enabled = ccu_gate_is_enabled, }; +EXPORT_SYMBOL (spacemit_ccu_gate_ops);const struct clk_ops spacemit_ccu_factor_ops = { .determine_rate = ccu_factor_determine_rate, .recalc_rate = ccu_factor_recalc_rate, .set_rate = ccu_factor_set_rate, }; +EXPORT_SYMBOL (spacemit_ccu_factor_ops);const struct clk_ops spacemit_ccu_mux_ops = { .determine_rate = ccu_mix_determine_rate, .get_parent = ccu_mux_get_parent, .set_parent = ccu_mux_set_parent, }; +EXPORT_SYMBOL (spacemit_ccu_mux_ops);const struct clk_ops spacemit_ccu_div_ops = { .determine_rate = ccu_mix_determine_rate, .recalc_rate = ccu_div_recalc_rate, .set_rate = ccu_mix_set_rate, }; +EXPORT_SYMBOL (spacemit_ccu_div_ops);const struct clk_ops spacemit_ccu_factor_gate_ops = { .disable = ccu_gate_disable,
@@ -226,6 +230,7 @@ const struct clk_ops spacemit_ccu_factor_gate_ops = { .recalc_rate = ccu_factor_recalc_rate, .set_rate = ccu_factor_set_rate, }; +EXPORT_SYMBOL (spacemit_ccu_factor_gate_ops);const struct clk_ops spacemit_ccu_mux_gate_ops = { .disable = ccu_gate_disable,
@@ -236,6 +241,7 @@ const struct clk_ops spacemit_ccu_mux_gate_ops = { .get_parent = ccu_mux_get_parent, .set_parent = ccu_mux_set_parent, }; +EXPORT_SYMBOL (spacemit_ccu_mux_gate_ops);const struct clk_ops spacemit_ccu_div_gate_ops = { .disable = ccu_gate_disable,
@@ -246,6 +252,7 @@ const struct clk_ops spacemit_ccu_div_gate_ops = { .recalc_rate = ccu_div_recalc_rate, .set_rate = ccu_mix_set_rate, }; +EXPORT_SYMBOL (spacemit_ccu_div_gate_ops);const struct clk_ops spacemit_ccu_mux_div_gate_ops = { .disable = ccu_gate_disable,
@@ -259,6 +266,7 @@ const struct clk_ops spacemit_ccu_mux_div_gate_ops = { .recalc_rate = ccu_div_recalc_rate, .set_rate = ccu_mix_set_rate, }; +EXPORT_SYMBOL (spacemit_ccu_mux_div_gate_ops);const struct clk_ops spacemit_ccu_mux_div_ops = { .get_parent = ccu_mux_get_parent,
@@ -268,3 +276,4 @@ const struct clk_ops spacemit_ccu_mux_div_ops = { .recalc_rate = ccu_div_recalc_rate, .set_rate = ccu_mix_set_rate, }; +EXPORT_SYMBOL (spacemit_ccu_mux_div_ops);
drivers/clk/spacemit/ccu_pll.c +5 -0
@@ -7,6 +7,7 @@#include <linux/clk-provider.h> #include <linux/math.h> #include <linux/regmap.h> +#include <linux/module.h> #include "ccu_common.h" #include "ccu_pll.h"
@@ -157,3 +158,7 @@ const struct clk_ops spacemit_ccu_pll_ops = { .determine_rate = ccu_pll_determine_rate, .is_enabled = ccu_pll_is_enabled, }; +EXPORT_SYMBOL (spacemit_ccu_pll_ops); + +MODULE_DESCRIPTION ("SpacemiT CCU PLL/MIX/DDN common driver" ); +MODULE_LICENSE ("GPL" );
Signature · 1 line
2.52.0
Quoted 9 lines · Inochi Amaoto
For build spacemit common clock driver as a module, the build process require MODULE_LICENSE()/MODULE_DESCRIPTION() globally and
EXPORT_SYMBOL()for every exposed symbol. Otherwise, the build will fail.Add these missing hints, so the driver can be built as a module.
Fixes 1b72c59db0ad ("clk: spacemit: Add clock support for SpacemiT K1 SoC")Signed-off-by Inochi Amaoto <[email protected]>
Thanks.
Hi Troy,
Quoted 6 lines · Troy Mitchell
Quoted 5 lines · Inochi Amaoto
For build spacemit common clock driver as a module, the build process require MODULE_LICENSE()/MODULE_DESCRIPTION() globally and
EXPORT_SYMBOL()for every exposed symbol. Otherwise, the build will fail.
Quoted 7 lines
Quoted 4 lines
Add these missing hints, so the driver can be built as a module.
Fixes 1b72c59db0ad ("clk: spacemit: Add clock support for SpacemiT K1 SoC")Signed-off-by Inochi Amaoto <[email protected]>Thanks.
Acked-by Troy Mitchell <[email protected]>
I think it's more proper to use reviewed-by here, for acked-by, it's up to subsystem maintainer or original patch author for signifying explict agreement or acceptance of patch inclusion..
Signature · 1 line
Yixun Lan (dlan)
Hi Inochi,
Quoted 9 lines · Inochi Amaoto
For build spacemit common clock driver as a module, the build process require MODULE_LICENSE()/MODULE_DESCRIPTION() globally and
EXPORT_SYMBOL()for every exposed symbol. Otherwise, the build will fail.Add these missing hints, so the driver can be built as a module.
Fixes 1b72c59db0ad ("clk: spacemit: Add clock support for SpacemiT K1 SoC")Signed-off-by Inochi Amaoto <[email protected]>
looks good, thanks
Signature · 1 line
Yixun Lan (dlan)
Hi
Quoted 8 lines · Yixun Lan
Hi Inochi,
Quoted 5 lines · Inochi Amaoto
For build spacemit common clock driver as a module, the build process require MODULE_LICENSE()/MODULE_DESCRIPTION() globally and
EXPORT_SYMBOL()for every exposed symbol. Otherwise, the build will fail.
Quoted 8 lines
Quoted 4 lines
Add these missing hints, so the driver can be built as a module.
Fixes 1b72c59db0ad ("clk: spacemit: Add clock support for SpacemiT K1 SoC")Signed-off-by Inochi Amaoto <[email protected]>looks good, thanks
Reviewed-by Yixun Lan <[email protected]>
On my second thought, since all functions only used in spacemit clock driver, how about using symbol namespaces? please refer the doc
https://www.kernel.org/doc/Documentation/kbuild/namespaces.rst
or check drivers/clk/meson/ for example..
Signature · 1 line
Yixun Lan (dlan)
Quoted 17 lines · Yixun Lan
Hi
Quoted 14 lines · Yixun Lan
Hi Inochi,
Quoted 9 lines · Inochi Amaoto
For build spacemit common clock driver as a module, the build process require MODULE_LICENSE()/MODULE_DESCRIPTION() globally and
EXPORT_SYMBOL()for every exposed symbol. Otherwise, the build will fail.Add these missing hints, so the driver can be built as a module.
Fixes 1b72c59db0ad ("clk: spacemit: Add clock support for SpacemiT K1 SoC")Signed-off-by Inochi Amaoto <[email protected]>looks good, thanks
Quoted 11 lines
Quoted 2 lines
Reviewed-by Yixun Lan <[email protected]>On my second thought, since all functions only used in spacemit clock driver, how about using symbol namespaces? please refer the doc
https://www.kernel.org/doc/Documentation/kbuild/namespaces.rst
or check
drivers/clk/meson/for example..Signature · 1 line
Yixun Lan (dlan)
Good to know, I will change this in the v2.
Regards,
Inochi