mirror of
https://github.com/apache/nuttx.git
synced 2026-08-17 17:43:22 +08:00
drivers/pinctrl: Add debug output levels.
The pinctrl framework has no debug output of its own, so a provider reporting a pad it could not configure 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_PINCTRL with the usual three levels and the matching pinctrlerr(), pinctrlwarn() and pinctrlinfo() macros, in the same shape as the reset ones above them. 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 <justin@dynam.ac>
This commit is contained in:
committed by
Xiang Xiao
parent
440be49862
commit
955ba67b7c
@@ -2363,6 +2363,38 @@ config DEBUG_RESET_INFO
|
||||
|
||||
endif # DEBUG_RESET
|
||||
|
||||
config DEBUG_PINCTRL
|
||||
bool "PINCTRL Debug Features"
|
||||
default n
|
||||
depends on PINCTRL
|
||||
---help---
|
||||
Enable PINCTRL debug features.
|
||||
|
||||
if DEBUG_PINCTRL
|
||||
|
||||
config DEBUG_PINCTRL_ERROR
|
||||
bool "PINCTRL Error Output"
|
||||
default n
|
||||
depends on DEBUG_ERROR
|
||||
---help---
|
||||
Enable PINCTRL driver error output to SYSLOG.
|
||||
|
||||
config DEBUG_PINCTRL_WARN
|
||||
bool "PINCTRL Warnings Output"
|
||||
default n
|
||||
depends on DEBUG_WARN
|
||||
---help---
|
||||
Enable PINCTRL driver warning output to SYSLOG.
|
||||
|
||||
config DEBUG_PINCTRL_INFO
|
||||
bool "PINCTRL Informational Output"
|
||||
default n
|
||||
depends on DEBUG_INFO
|
||||
---help---
|
||||
Enable PINCTRL driver informational output to SYSLOG.
|
||||
|
||||
endif # DEBUG_PINCTRL
|
||||
|
||||
config DEBUG_IPC
|
||||
bool "IPC (Inter-Process Communication) Debug Features"
|
||||
default n
|
||||
|
||||
@@ -959,6 +959,24 @@
|
||||
# define rstinfo _none
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_PINCTRL_ERROR
|
||||
# define pinctrlerr _err
|
||||
#else
|
||||
# define pinctrlerr _none
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_PINCTRL_WARN
|
||||
# define pinctrlwarn _warn
|
||||
#else
|
||||
# define pinctrlwarn _none
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_PINCTRL_INFO
|
||||
# define pinctrlinfo _info
|
||||
#else
|
||||
# define pinctrlinfo _none
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_IPC_ERROR
|
||||
# define ipcerr _err
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user