mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-10 15:49:01 -04:00
When checking if the device can wake the system, we should pull the device_may_wakeup() check to the caller instead of repeating it inside the toggle_wakeup() handler. Furthermore, when configuring the wakeup, we should safely ensure we write to the registers in the correct order: configure the interrupt receiver before enabling the peripheral's wake functionality, and vice-versa. Assisted-by: Antigravity:gemini-3.1-pro Link: https://patch.msgid.link/20260713-samsung-kp-irq-v2-1-acc84b6daf9a@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>