PM / suspend: Print the driver flags of device during suspend resume
Subsystems (4)
PATCH 1/1 PM / suspend: Print the driver flags of device during suspend resume
Currently there are 4 driver flags to control system suspend/resume
behavior: DPM_FLAG_NO_DIRECT_COMPLETE, DPM_FLAG_SMART_PREPARE, DPM_FLAG_SMART_SUSPEND and DPM_FLAG_MAY_SKIP_RESUME. Print these flags during suspend resume so as to get a brief understanding of the expected behavior of each device, and to facilitate suspend/resume debugging/tuning.
To enable this tracing:
echo 'file drivers/base/power/main.c +p' >/sys/kernel/debug/dynamic_debug/control
--- drivers/base/power/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/base/power/main.c +2 -2
@@ -442,9 +442,9 @@ static pm_callback_t pm_noirq_op(const struct dev_pm_ops *ops, pm_message_t statstatic void pm_dev_dbg (struct device *dev,pm_message_t state,const char *info) { -dev_dbg (dev,"%s%s%s\n" , info,pm_verb (state.event), +dev_dbg (dev,"%s%s%s driver flags: %x\n" , info,pm_verb (state.event), ((state.event &PM_EVENT_SLEEP ) &&device_may_wakeup (dev)) ? -", may wakeup" :"" ); +", may wakeup" :"" , dev->power.driver_flags); } static void pm_dev_err(struct device *dev, pm_message_t state, const char *info,
Signature · 1 line
2.17.1
Rafael J. Wysocki
maintainerQuoted 24 lines · Chen Yu
Currently there are 4 driver flags to control system suspend/resume
behavior:DPM_FLAG_NO_DIRECT_COMPLETE,DPM_FLAG_SMART_PREPARE,DPM_FLAG_SMART_SUSPENDandDPM_FLAG_MAY_SKIP_RESUME. Print these flags during suspend resume so as to get a brief understanding of the expected behavior of each device, and to facilitate suspend/resume debugging/tuning.To enable this tracing:
echo 'filedrivers/base/power/main.c+p' >/sys/kernel/debug/dynamic_debug/controlSigned-off-by Chen Yu <[email protected]>--- drivers/base/power/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/base/power/main.c +0
-0@@ -442,9 +442,9 @@ static pm_callback_t pm_noirq_op(const struct dev_pm_ops *ops, pm_message_t statstatic void pm_dev_dbg (struct device *dev,pm_message_t state,const char *info)
drivers/base/power/main.c static pm_callback_t pm_noirq_op(const struct dev_pm_ops *ops, pm_message_t stat
Quoted 10 lines
drivers/base/power/main.c +2
-3{ -dev_dbg (dev,"%s%s%s\n" , info,pm_verb (state.event), +dev_dbg (dev,"%s%s%s driver flags: %x\n" , info,pm_verb (state.event), ((state.event &PM_EVENT_SLEEP ) &&device_may_wakeup (dev)) ? -", may wakeup" :"" ); +", may wakeup" :"" , dev->power.driver_flags); } static void pm_dev_err(struct device *dev, pm_message_t state, const char *info, --
Applied (with some edits in the subject and changelog) as 5.11 material, thanks!