Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63962e14 authored by Ulf Hansson's avatar Ulf Hansson Committed by Tri Vo
Browse files

UPSTREAM: PM / wakeup: Print warn if device gets enabled as wakeup source during sleep



In general, wakeup settings are not supposed to be changed during any of
the system wide PM phases. The reason is simply that it would break
guarantees provided by the PM core, to properly act on active wakeup
sources.

However, there are exceptions to when, in particular, disabling a device as
wakeup source makes sense. For example, in cases when a driver realizes
that its device is dead during system suspend. For these scenarios, we
don't need to care about acting on the wakeup source correctly, because a
dead device shouldn't deliver wakeup signals.

To this reasoning and to help users to properly manage wakeup settings,
let's print a warning in cases someone calls device_wakeup_enable() during
system sleep.

Suggested-by: default avatarRafael J. Wysocki <rafael@kernel.org>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
[ rjw: Message to be printed ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 0026cef0)
Bug: 129087298
Signed-off-by: default avatarTri Vo <trong@google.com>
Change-Id: I81c92ac2f80f4fe2df0f769a2f73d6cf7737b727
parent 29eab62f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment