kernel_samsung_a53x/drivers/base
Qingliang Li 4e0bf4a49c PM: sleep: wakeirq: fix wake irq warning in system suspend
[ Upstream commit e7a7681c859643f3f2476b2a28a494877fd89442 ]

When driver uses pm_runtime_force_suspend() as the system suspend callback
function and registers the wake irq with reverse enable ordering, the wake
irq will be re-enabled when entering system suspend, triggering an
'Unbalanced enable for IRQ xxx' warning. In this scenario, the call
sequence during system suspend is as follows:
  suspend_devices_and_enter()
    -> dpm_suspend_start()
      -> dpm_run_callback()
        -> pm_runtime_force_suspend()
          -> dev_pm_enable_wake_irq_check()
          -> dev_pm_enable_wake_irq_complete()

    -> suspend_enter()
      -> dpm_suspend_noirq()
        -> device_wakeup_arm_wake_irqs()
          -> dev_pm_arm_wake_irq()

To fix this issue, complete the setting of WAKE_IRQ_DEDICATED_ENABLED flag
in dev_pm_enable_wake_irq_complete() to avoid redundant irq enablement.

Fixes: 8527beb12087 ("PM: sleep: wakeirq: fix wake irq arming")
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Qingliang Li <qingliang.li@mediatek.com>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Cc: 5.16+ <stable@vger.kernel.org> # 5.16+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 09:22:17 +01:00
..
firmware_loader
power PM: sleep: wakeirq: fix wake irq warning in system suspend 2024-11-19 09:22:17 +01:00
regmap regmap: Add missing map->bus check 2024-11-19 08:45:00 +01:00
test
arch_topology.c
attribute_container.c
base.h
bus.c
cacheinfo.c
class.c
component.c
container.c
core.c driver core: Move the "removable" attribute from USB to core 2024-11-18 12:11:13 +01:00
cpu.c
dd.c driver core: Release all resources during unbind before updating device links 2024-11-18 12:11:17 +01:00
devcoredump.c devcoredump: Send uevent once devcd is ready 2024-11-18 12:11:48 +01:00
devres.c
devtmpfs.c
driver.c driver: platform: Add helper for safer setting of driver_override 2024-11-18 10:58:45 +01:00
firmware.c
hypervisor.c
init.c
isa.c
Kconfig
Makefile
map.c
memory.c
module.c
node.c
pinctrl.c
platform-mock.c
platform-msi.c
platform.c driver: platform: Add helper for safer setting of driver_override 2024-11-18 10:58:45 +01:00
property.c
soc.c
swnode.c software node: Let args be NULL in software_node_get_reference_args 2024-11-18 12:12:49 +01:00
syscore.c
topology.c
transport_class.c