diff --git a/drivers/clk/rockchip/Kconfig b/drivers/clk/rockchip/Kconfig index 00c20f90974f..50dd15527f1c 100644 --- a/drivers/clk/rockchip/Kconfig +++ b/drivers/clk/rockchip/Kconfig @@ -73,7 +73,7 @@ config CLK_RK3308 Build the driver for RK3308 Clock Driver. config CLK_RK3328 - bool "Rockchip RK3328 clock controller support" + tristate "Rockchip RK3328 clock controller support" depends on ARM64 || COMPILE_TEST default y help diff --git a/drivers/clk/rockchip/clk-rk3328.c b/drivers/clk/rockchip/clk-rk3328.c index 09c8534a91c6..a06dd077e1cf 100644 --- a/drivers/clk/rockchip/clk-rk3328.c +++ b/drivers/clk/rockchip/clk-rk3328.c @@ -6,8 +6,10 @@ #include #include +#include #include #include +#include #include #include #include "clk.h" @@ -921,3 +923,31 @@ static void __init rk3328_clk_init(struct device_node *np) rockchip_clk_of_add_provider(np, ctx); } CLK_OF_DECLARE(rk3328_cru, "rockchip,rk3328-cru", rk3328_clk_init); + +static int __init clk_rk3328_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; + + rk3328_clk_init(np); + + return 0; +} + +static const struct of_device_id clk_rk3328_match_table[] = { + { + .compatible = "rockchip,rk3328-cru", + }, + { } +}; +MODULE_DEVICE_TABLE(of, clk_rk3328_match_table); + +static struct platform_driver clk_rk3328_driver = { + .driver = { + .name = "clk-rk3328", + .of_match_table = clk_rk3328_match_table, + }, +}; +builtin_platform_driver_probe(clk_rk3328_driver, clk_rk3328_probe); + +MODULE_DESCRIPTION("Rockchip RK3328 Clock Driver"); +MODULE_LICENSE("GPL");