[dm][core] Set default CLK config for platform device probe

Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
GuEe-GUI
2025-12-09 17:42:32 +08:00
committed by R b b666
parent 335a1242b0
commit 6270b2f97c

View File

@@ -15,6 +15,9 @@
#define DBG_LVL DBG_INFO
#include <rtdbg.h>
#ifdef RT_USING_CLK
#include <drivers/clk.h>
#endif
#include <drivers/platform.h>
#include <drivers/core/bus.h>
#include <drivers/core/dm.h>
@@ -119,6 +122,13 @@ static rt_err_t platform_probe(rt_device_t dev)
struct rt_ofw_node *np = dev->ofw_node;
#endif
#ifdef RT_USING_CLK
if ((err = rt_ofw_clk_set_defaults(dev->ofw_node)))
{
return err;
}
#endif
err = rt_dm_power_domain_attach(dev, RT_TRUE);
if (err && err != -RT_EEMPTY)