android_kernel_oneplus_msm8998/drivers/base/power
Ulf Hansson db7eb20656 PM / core: Propagate dev->power.wakeup_path when no callbacks
[ Upstream commit dc351d4c5f4fe4d0f274d6d660227be0c3a03317 ]

The dev->power.direct_complete flag may become set in device_prepare() in
case the device don't have any PM callbacks (dev->power.no_pm_callbacks is
set). This leads to a broken behaviour, when there is child having wakeup
enabled and relies on its parent to be used in the wakeup path.

More precisely, when the direct complete path becomes selected for the
child in __device_suspend(), the propagation of the dev->power.wakeup_path
becomes skipped as well.

Let's address this problem, by checking if the device is a part the wakeup
path or has wakeup enabled, then prevent the direct complete path from
being used.

Reported-by: Loic Pallardy <loic.pallardy@st.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
[ rjw: Comment cleanup ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-11 12:24:00 +02:00
..
opp PM / OPP: Add missing of_node_put(np) 2017-11-30 08:37:25 +00:00
clock_ops.c ARM: SoC driver updates for v4.4 2015-11-10 15:00:03 -08:00
common.c
domain.c PM / Domains: defer dev_pm_domain_set() until genpd->attach_dev succeeds if present 2017-08-06 19:19:42 -07:00
domain_governor.c PM / Domains: Validate cases of a non-bound driver in genpd governor 2015-12-02 15:21:21 +01:00
generic_ops.c PM / PCI / ACPI: Kick devices that might have been reset by firmware 2015-10-14 02:17:34 +02:00
main.c PM / core: Propagate dev->power.wakeup_path when no callbacks 2019-06-11 12:24:00 +02:00
Makefile PM / OPP: Move opp core to its own directory 2015-09-15 02:03:16 +02:00
power.h PM / wakeirq: Fix dedicated wakeirq for drivers not using autosuspend 2017-01-12 11:22:49 +01:00
qos.c PM / QoS: Make it possible to expose device latency tolerance to userspace 2015-07-28 08:50:41 +01:00
runtime.c PM / runtime: Avoid false-positive warnings from might_sleep_if() 2017-06-17 06:39:36 +02:00
sysfs.c PM / QoS: return -EINVAL for bogus strings 2017-07-21 07:44:59 +02:00
trace.c PM / sleep: declare __tracedata symbols as char[] rather than char 2018-01-31 12:06:08 +01:00
wakeirq.c PM / wakeirq: report a wakeup_event on dedicated wekup irq 2017-11-08 10:06:28 +01:00
wakeup.c PM / wakeup: Rework wakeup source timer cancellation 2019-03-23 08:44:39 +01:00