diff --git a/drivers/clk/rockchip/Kconfig b/drivers/clk/rockchip/Kconfig index 18f44b8fa7bc..682bd852ee07 100644 --- a/drivers/clk/rockchip/Kconfig +++ b/drivers/clk/rockchip/Kconfig @@ -52,7 +52,7 @@ config CLK_RK3188 Build the driver for RK3188 Clock Driver. config CLK_RK322X - bool "Rockchip RK322x clock controller support" + tristate "Rockchip RK322x clock controller support" depends on ARM || COMPILE_TEST default y help diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c index ff92b91da0e9..44caf210c119 100644 --- a/drivers/clk/rockchip/clk-rk3228.c +++ b/drivers/clk/rockchip/clk-rk3228.c @@ -7,8 +7,10 @@ #include #include +#include #include #include +#include #include #include #include "clk.h" @@ -740,3 +742,31 @@ static void __init rk3228_clk_init(struct device_node *np) } } CLK_OF_DECLARE(rk3228_cru, "rockchip,rk3228-cru", rk3228_clk_init); + +static int __init clk_rk3228_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; + + rk3228_clk_init(np); + + return 0; +} + +static const struct of_device_id clk_rk3228_match_table[] = { + { + .compatible = "rockchip,rk3228-cru", + }, + { } +}; +MODULE_DEVICE_TABLE(of, clk_rk3228_match_table); + +static struct platform_driver clk_rk3228_driver = { + .driver = { + .name = "clk-rk3228", + .of_match_table = clk_rk3228_match_table, + }, +}; +builtin_platform_driver_probe(clk_rk3228_driver, clk_rk3228_probe); + +MODULE_DESCRIPTION("Rockchip RK3228 Clock Driver"); +MODULE_LICENSE("GPL");