diff --git a/drivers/clk/rockchip/Kconfig b/drivers/clk/rockchip/Kconfig index 551729985ce8..00c20f90974f 100644 --- a/drivers/clk/rockchip/Kconfig +++ b/drivers/clk/rockchip/Kconfig @@ -66,7 +66,7 @@ config CLK_RK3288 Build the driver for RK3288 Clock Driver. config CLK_RK3308 - bool "Rockchip RK3308 clock controller support" + tristate "Rockchip RK3308 clock controller support" depends on ARM64 || COMPILE_TEST default y help diff --git a/drivers/clk/rockchip/clk-rk3308.c b/drivers/clk/rockchip/clk-rk3308.c index 3742e640ed7a..189ecabada1c 100644 --- a/drivers/clk/rockchip/clk-rk3308.c +++ b/drivers/clk/rockchip/clk-rk3308.c @@ -8,6 +8,9 @@ #include #include #include +#include +#include +#include #include #include #include "clk.h" @@ -961,3 +964,31 @@ static void __init rk3308_clk_init(struct device_node *np) } CLK_OF_DECLARE(rk3308_cru, "rockchip,rk3308-cru", rk3308_clk_init); + +static int __init clk_rk3308_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; + + rk3308_clk_init(np); + + return 0; +} + +static const struct of_device_id clk_rk3308_match_table[] = { + { + .compatible = "rockchip,rk3308-cru", + }, + { } +}; +MODULE_DEVICE_TABLE(of, clk_rk3308_match_table); + +static struct platform_driver clk_rk3308_driver = { + .driver = { + .name = "clk-rk3308", + .of_match_table = clk_rk3308_match_table, + }, +}; +builtin_platform_driver_probe(clk_rk3308_driver, clk_rk3308_probe); + +MODULE_DESCRIPTION("Rockchip RK3308 Clock Driver"); +MODULE_LICENSE("GPL");