drivers/pinctrl, drivers/clk: Add debug output levels. - #19864
Merged
Conversation
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>
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 <justin@dynam.ac>
|
Contributor
Author
|
(FYI, Another PR coming soon that utilizes these logging functions) |
acassis
approved these changes
Aug 16, 2026
xiaoxiang781216
approved these changes
Aug 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Neither the pinctrl nor the clock framework has debug output of its own, so a
provider reporting a pad it could not configure, or a clock it could not
register, has to reach for the bare
_err()and_info()macros. Those aregated only by
DEBUG_ERRORandDEBUG_INFO, so their output cannot be turnedoff without silencing every subsystem that has not been given its own level.
This adds
CONFIG_DEBUG_PINCTRLandCONFIG_DEBUG_CLK, each with the usualthree levels, and the matching
pinctrlerr()/pinctrlwarn()/pinctrlinfo()and
clkerr()/clkwarn()/clkinfo()macros. Both follow the shape of theDEBUG_RESETblock they sit beside, and both are placed next to it inKconfigand ininclude/nuttx/debug.h.One commit each, so either can be taken on its own.
Impact
None until something uses them. Nothing selects the new symbols, they default
to
n, and each depends on its subsystem being enabled, so the build isunchanged for every existing configuration. Additions only: no existing line is
modified.
Testing
sim:nshconfigured withCLK,PINCTRL,DEBUG_CLK,DEBUG_PINCTRLandboth
_INFOlevels enabled: kconfig parses, all six symbols appear in theresulting
.config, and the image builds.Also built with the symbols left at their defaults, which is a no-op change.