android_kernel_xiaomi_sm8350/include
Chunfeng Yun d7f34e2cdd PM / wakeirq: support enabling wake-up irq after runtime_suspend called
[ Upstream commit 259714100d98b50bf04d36a21bf50ca8b829fc11 ]

When the dedicated wake IRQ is level trigger, and it uses the
device's low-power status as the wakeup source, that means if the
device is not in low-power state, the wake IRQ will be triggered
if enabled; For this case, need enable the wake IRQ after running
the device's ->runtime_suspend() which make it enter low-power state.

e.g.
Assume the wake IRQ is a low level trigger type, and the wakeup
signal comes from the low-power status of the device.
The wakeup signal is low level at running time (0), and becomes
high level when the device enters low-power state (runtime_suspend
(1) is called), a wakeup event at (2) make the device exit low-power
state, then the wakeup signal also becomes low level.

                ------------------
               |           ^     ^|
----------------           |     | --------------
 |<---(0)--->|<--(1)--|   (3)   (2)    (4)

if enable the wake IRQ before running runtime_suspend during (0),
a wake IRQ will arise, it causes resume immediately;
it works if enable wake IRQ ( e.g. at (3) or (4)) after running
->runtime_suspend().

This patch introduces a new status WAKE_IRQ_DEDICATED_REVERSE to
optionally support enabling wake IRQ after running ->runtime_suspend().

Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: 8527beb12087 ("PM: sleep: wakeirq: fix wake irq arming")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:54:00 +02:00
..
acpi
asm-generic word-at-a-time: use the same return type for has_zero regardless of endianness 2023-08-11 11:53:54 +02:00
clocksource
crypto
drm drm/panel: Add and fill drm_panel type field 2023-07-27 08:37:29 +02:00
dt-bindings
keys
kvm
linux PM / wakeirq: support enabling wake-up irq after runtime_suspend called 2023-08-11 11:54:00 +02:00
math-emu
media media: dvb-core: Fix use-after-free due to race at dvb_register_device() 2023-06-28 10:18:36 +02:00
misc
net tcp: Reduce chance of collisions in inet6_hashfn(). 2023-08-11 11:53:47 +02:00
pcmcia
ras
rdma
scsi scsi: stex: Properly zero out the passthrough command structure 2022-10-15 07:54:39 +02:00
soc firmware: raspberrypi: Introduce devm_rpi_firmware_get() 2023-05-17 11:35:52 +02:00
sound ASoC: soc-dapm.h: fixup warning struct snd_pcm_substream not declared 2023-03-11 16:43:48 +01:00
target
trace tracing/timer: Add missing hrtimer modes to decode_hrtimer_mode(). 2023-07-27 08:37:05 +02:00
uapi block: Fix a source code comment in include/uapi/linux/blkzoned.h 2023-08-11 11:53:49 +02:00
vdso
video
xen dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00