diff mbox series

[v3,3/3] irqchip/gic-pm: fix suspend handling

Message ID 1553182415-11269-4-git-send-email-spujar@nvidia.com
State Changes Requested
Headers show
Series build support and fixes for gic-pm | expand

Commit Message

Sameer Pujar March 21, 2019, 3:33 p.m. UTC
If interrupts are enabled for a non-root GIC device that uses the
gic-pm driver, when system suspend occurs, the current interrupt
state is not saved and restored correctly and so interrupts do not
work again on resuming the system. Add a late suspend handler to
save and restore the state for these devices.

Suggested-by: Jonathan Hunter <jonathanh@nvidia.com>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
---
 drivers/irqchip/irq-gic-pm.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jon Hunter March 21, 2019, 4:32 p.m. UTC | #1
On 21/03/2019 15:33, Sameer Pujar wrote:
> If interrupts are enabled for a non-root GIC device that uses the
> gic-pm driver, when system suspend occurs, the current interrupt
> state is not saved and restored correctly and so interrupts do not
> work again on resuming the system. Add a late suspend handler to
> save and restore the state for these devices.
> 
> Suggested-by: Jonathan Hunter <jonathanh@nvidia.com>
> Signed-off-by: Sameer Pujar <spujar@nvidia.com>
> ---
>  drivers/irqchip/irq-gic-pm.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/irqchip/irq-gic-pm.c b/drivers/irqchip/irq-gic-pm.c
> index b557a53..3e7dc0c 100644
> --- a/drivers/irqchip/irq-gic-pm.c
> +++ b/drivers/irqchip/irq-gic-pm.c
> @@ -156,6 +156,8 @@ static int gic_probe(struct platform_device *pdev)
>  static const struct dev_pm_ops gic_pm_ops = {
>  	SET_RUNTIME_PM_OPS(gic_runtime_suspend,
>  			   gic_runtime_resume, NULL)
> +	SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
> +				     pm_runtime_force_resume)
>  };
>  
>  static const char * const gic400_clocks[] = {

Acked-by: Jon Hunter <jonathanh@nvidia.com>

Cheers
Jon
diff mbox series

Patch

diff --git a/drivers/irqchip/irq-gic-pm.c b/drivers/irqchip/irq-gic-pm.c
index b557a53..3e7dc0c 100644
--- a/drivers/irqchip/irq-gic-pm.c
+++ b/drivers/irqchip/irq-gic-pm.c
@@ -156,6 +156,8 @@  static int gic_probe(struct platform_device *pdev)
 static const struct dev_pm_ops gic_pm_ops = {
 	SET_RUNTIME_PM_OPS(gic_runtime_suspend,
 			   gic_runtime_resume, NULL)
+	SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+				     pm_runtime_force_resume)
 };
 
 static const char * const gic400_clocks[] = {