diff options
| author | GuEe-GUI <[email protected]> | 2025-12-09 17:42:32 +0800 |
|---|---|---|
| committer | R b b666 <[email protected]> | 2025-12-12 13:33:28 +0800 |
| commit | 6270b2f97ccfc572a4e2dfbc5f20b5c2bc173bbc (patch) | |
| tree | db118bfdde5ab7f6cae4e1db1c17d241ee703281 | |
| parent | 335a1242b0d4bf1a0c82a71e1da3bb2e72bfeb84 (diff) | |
[dm][core] Set default CLK config for platform device probe
Signed-off-by: GuEe-GUI <[email protected]>
| -rw-r--r-- | components/drivers/core/platform.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/components/drivers/core/platform.c b/components/drivers/core/platform.c index c3a141654a..d308dd0806 100644 --- a/components/drivers/core/platform.c +++ b/components/drivers/core/platform.c @@ -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) |
