summaryrefslogtreecommitdiff
path: root/components/drivers/clk/clk.c
AgeCommit message (Collapse)Author
2026-08-08[dm][clk] fixup the work flow of CLK (#11673)GUI
* [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]>
2025-12-12[dm][clk] refactoring the CLK frameworkGuEe-GUI
The old CLK is can't link all hardware clock cell in system that the API of layout such as 'set_parent' can't work as expected. Some hareware clock cell need some flags to prevent some dangerous behaviors, eg: When a clock cell is link to the PMU, the SoC will power-down if the cell is disable. The new CLK can do it, and make the CLK drivers implemented easier from TRM/DataSheet. Signed-off-by: GuEe-GUI <[email protected]>
2025-07-22doxygen: fix duplicated defgroup for clockChen Wang
Problen: Duplicated definition of group_clk in clk.c and clk.h. Solution: Delete the definition in clk.c and keep only the definition in clk.h. Also change the name of group_clk to group_driver_clock to conform to the naming convention of other driver groups. Signed-off-by: Chen Wang <[email protected]>
2025-05-29doxygen: change group_Drivers to group_device_driverChen Wang
The originally defined "group_Drivers" should actually be part of the device-driver component, so "group_Drivers" is renamed to "group_device_driver". In this way, the original "group_Device" and "group_Drivers" are merged into "group_device_driver". Adjusted the writing method of doxygen comments in the driver code to be unified as follows: ```c * @defgroup group_XXX XXX * @brief xxxxxx * @ingroup group_device_driver ``` Signed-off-by: Chen Wang <[email protected]>
2025-02-15doxygen: add prefix for groups (#9991)Chen Wang
* doxygen: add prefix for groups Add "group_" prefix to doxygen group names. This makes it easier to grep with group name later. This patch only modifies the groups defined in the pathes of INPUT of documentation/Doxyfile: INPUT = . \ ../src \ ../include \ ../components/finsh \ ../components/drivers/include/drivers \ ../components/drivers/clk \ ../components/dfs/dfs_v2/src \ ../components/dfs/dfs_v2/include Other groups are not touched. Signed-off-by: Chen Wang <[email protected]> * ci: fixed error report when run file_check.py Such as: - "please delete extra space at the end of this line." - "the RT-Thread error code should return negative value. e.g. return -RT_ERROR" Signed-off-by: Chen Wang <[email protected]> --------- Signed-off-by: Chen Wang <[email protected]>
2025-02-11[DM] Replace spinlock static init by RT_DEFINE_SPINLOCKGuEe-GUI
Signed-off-by: GuEe-GUI <[email protected]>
2025-01-27[doxygen] add doxygen comment for clk.c and clk.h (#9950)wumingzi
Accroding to #9947 and #9424, adding doxygen comment for function in .c files and data structure, macro in .h file is a solution.For this pr, I encountered problem following situations. - rt_clk_unprepare function return value type is different from rt_clk_ops so I change type of rt_clk_unprepare and its dependencies. - clk_get function may be similar as rt_clk_unprepare but I'm not sure so not modify. - clk_release implements may be incomplete, so I just marked in comment. Signed-off-by: 1078249029 <[email protected]>
2024-11-20[DM/FIXUP] Fixup CLKGuEe-GUI
1. Default return OK when input NULL (if is not necessary in device). 2. Support object parse in OFW. 3. Support CLK depends fix auto. 4. Fixup rt_clk_array_prepare_enable and rt_clk_array_disable_unprepare. Signed-off-by: GuEe-GUI <[email protected]>
2024-04-16[components][drivers]fix some uninitialize err (#8806)zms123456
fix some uninitialize err
2023-12-24[component][drivers]add clk framework (#8213)zms123456