diff options
author | Samuel Holland <samuel@sholland.org> | 2021-01-18 06:50:34 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-01-21 21:21:49 +0100 |
commit | 7ab365f6cd6de1e2b0cb1e1e3873dbf68e6f1003 (patch) | |
tree | b6e2e6b3cdbe6ac65ec7a44394ce1e0e7a158cdc /kernel/power/energy_model.c | |
parent | irqchip/sun6i-r: Use a stacked irqchip driver (diff) | |
download | linux-7ab365f6cd6de1e2b0cb1e1e3873dbf68e6f1003.tar.xz linux-7ab365f6cd6de1e2b0cb1e1e3873dbf68e6f1003.zip |
irqchip/sun6i-r: Add wakeup support
Maintain bitmaps of wake-enabled IRQs and mux inputs, and program them
to the hardware during the syscore phase of suspend and shutdown. Then
restore the original set of enabled IRQs (only the NMI) during resume.
This serves two purposes. First, it lets power management firmware
running on the ARISC coprocessor know which wakeup sources Linux wants
to have enabled. That way, it can avoid turning them off when it shuts
down the remainder of the clock tree. Second, it preconfigures the
coprocessor's interrupt controller, so the firmware's wakeup logic
is as simple as waiting for an interrupt to arrive.
The suspend/resume logic is not conditional on PM_SLEEP because it is
identical to the init/shutdown logic. Wake IRQs may be enabled during
shutdown to allow powering the board back on. As an example, see
commit a5c5e50cce9d ("Input: gpio-keys - add shutdown callback").
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210118055040.21910-5-samuel@sholland.org
Diffstat (limited to 'kernel/power/energy_model.c')
0 files changed, 0 insertions, 0 deletions