diff options
| author | GUI <[email protected]> | 2026-08-08 18:25:02 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-08-08 18:25:02 +0800 |
| commit | 9d04b6baab847a40fe4980562ac5ab05bd7d0989 (patch) | |
| tree | 009d1794ddcea80dd9460a5de1783edb0fd8c0b9 /components/drivers/include | |
| parent | a2c196d6439643356490f62370d34001ee66af99 (diff) | |
[dm][clk] fixup the work flow of CLK (#11673)
* [dm][clk] fixup the work flow of CLK
Add RT_CLK_F_SET_RATE_NO_REPARENT so clock providers can preserv
the currently selected parent during rate changes.
Round and re-read the effective clock rate after parent handling,
skip redundant gate toggles and hardware programming when
the target is already active, and fix error handling for parent-clock allocation failures.
Signed-off-by: GuEe-GUI <[email protected]>
* style: format code with clang-format
* style: format complete changed files with clang-format
---------
Signed-off-by: GuEe-GUI <[email protected]>
Diffstat (limited to 'components/drivers/include')
| -rw-r--r-- | components/drivers/include/drivers/clk.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/drivers/include/drivers/clk.h b/components/drivers/include/drivers/clk.h index dd74fdc85b..5a282bdcb1 100644 --- a/components/drivers/include/drivers/clk.h +++ b/components/drivers/include/drivers/clk.h @@ -84,6 +84,7 @@ struct rt_clk_node #define RT_CLK_F_SET_RATE_UNGATE RT_BIT(4) /**< Clock needs to run to set rate */ #define RT_CLK_F_IS_CRITICAL RT_BIT(5) /**< Do not gate, ever */ #define RT_CLK_F_GET_RATE_NOCACHE RT_BIT(6) /**< Do not get rate by cache */ +#define RT_CLK_F_SET_RATE_NO_REPARENT RT_BIT(7) /**< Keep the selected parent across rate changes */ /** * @brief Clock cell - represents a single hardware clock element. @@ -299,4 +300,4 @@ rt_inline rt_err_t rt_ofw_clk_set_defaults(struct rt_ofw_node *np) /*! @}*/ -#endif /* __CLK_H__ */
\ No newline at end of file +#endif /* __CLK_H__ */ |
