console/logging: uart: Device Idle Power Management #26401
Closed
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.
These two patches allow the console and logging UART backends to coexist with 'Device Idle Power Management'.
An application can enable idle power management on the UART backend with
device_pm_enable
and no longer need to worry about the UART hardware being enabled when it does not need to be.Relevant code is only run when the power management hardware has been manually enabled.
The console request/release code is less efficient than the corresponding logging request/release code as the console output function operates on single bytes. There are 3 options to mitigate this:
device_pm_get_sync
anddevice_pm_put_sync
before large numbers of printsCONFIG_LOG_PRINTK