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:
Justin Hammond
2026-08-16 23:23:04 +08:00
committed by Xiang Xiao
parent 440be49862
commit 955ba67b7c
2 changed files with 50 additions and 0 deletions
+32
View File
@@ -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
+18
View File
@@ -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