Skip to content

Commit f39ee99

Browse files
yu-chen-surfrafaeljw
authored andcommitted
PM: sleep: Print driver flags for all devices 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 Signed-off-by: Chen Yu <[email protected]> [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent f8394f2 commit f39ee99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/base/power/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,9 @@ static pm_callback_t pm_noirq_op(const struct dev_pm_ops *ops, pm_message_t stat
441441

442442
static void pm_dev_dbg(struct device *dev, pm_message_t state, const char *info)
443443
{
444-
dev_dbg(dev, "%s%s%s\n", info, pm_verb(state.event),
444+
dev_dbg(dev, "%s%s%s driver flags: %x\n", info, pm_verb(state.event),
445445
((state.event & PM_EVENT_SLEEP) && device_may_wakeup(dev)) ?
446-
", may wakeup" : "");
446+
", may wakeup" : "", dev->power.driver_flags);
447447
}
448448

449449
static void pm_dev_err(struct device *dev, pm_message_t state, const char *info,

0 commit comments

Comments
 (0)