This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit e9567a7633770d2572638d282d2a575f3895516b Author: Justin Hammond <[email protected]> AuthorDate: Sun Aug 16 18:33:56 2026 +0800 drivers/clk: Add debug output levels. The clock framework has no debug output of its own, so a provider reporting a clock it could not register, or a tree it wants to dump at startup, has to reach for the bare _err() and _info() macros. Those are gated only by DEBUG_ERROR and DEBUG_INFO, so the output cannot be turned off without silencing every subsystem that has not been given its own level. Add CONFIG_DEBUG_CLK with the usual three levels and the matching clkerr(), clkwarn() and clkinfo() macros, alongside the pinctrl ones in the previous commit and for the same reason. Nothing selects these, so the build is unchanged until a provider starts using them. Assisted-by: Claude:claude-opus-5 Signed-off-by: Justin Hammond <[email protected]> --- Kconfig | 32 ++++++++++++++++++++++++++++++++ include/nuttx/debug.h | 18 ++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/Kconfig b/Kconfig index b7cca6e82f2..e0cfa1c37be 100644 --- a/Kconfig +++ b/Kconfig @@ -2395,6 +2395,38 @@ config DEBUG_PINCTRL_INFO endif # DEBUG_PINCTRL +config DEBUG_CLK + bool "CLK Debug Features" + default n + depends on CLK + ---help--- + Enable CLK debug features. + +if DEBUG_CLK + +config DEBUG_CLK_ERROR + bool "CLK Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable CLK driver error output to SYSLOG. + +config DEBUG_CLK_WARN + bool "CLK Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable CLK driver warning output to SYSLOG. + +config DEBUG_CLK_INFO + bool "CLK Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable CLK driver informational output to SYSLOG. + +endif # DEBUG_CLK + config DEBUG_IPC bool "IPC (Inter-Process Communication) Debug Features" default n diff --git a/include/nuttx/debug.h b/include/nuttx/debug.h index e4000ea37ee..3cb236db3f9 100644 --- a/include/nuttx/debug.h +++ b/include/nuttx/debug.h @@ -977,6 +977,24 @@ # define pinctrlinfo _none #endif +#ifdef CONFIG_DEBUG_CLK_ERROR +# define clkerr _err +#else +# define clkerr _none +#endif + +#ifdef CONFIG_DEBUG_CLK_WARN +# define clkwarn _warn +#else +# define clkwarn _none +#endif + +#ifdef CONFIG_DEBUG_CLK_INFO +# define clkinfo _info +#else +# define clkinfo _none +#endif + #ifdef CONFIG_DEBUG_IPC_ERROR # define ipcerr _err #else
