[PATCH 3/3] gpio: brcmstb: allow parent_irq to wake

Andy Shevchenko andy.shevchenko at gmail.com
Wed Jan 21 23:42:04 PST 2026


On Thu, Jan 22, 2026 at 3:06 AM Florian Fainelli
<florian.fainelli at broadcom.com> wrote:

> The classic parent_wake_irq can only occur after the system has
> been placed into a hardware managed power management state. This
> prevents its use for waking from software managed suspend states
> like s2idle.
>
> By allowing the parent_irq to be enabled for wake enabled GPIO
> during suspend, these GPIO can now be used to wake from these
> states. The 'suspended' boolean is introduced to support wake
> event accounting.

> Signed-off-by: Doug Berger <opendmb at gmail.com>
> [florian: port changes after generic gpio chip conversion]

Likewise in the previous patch I think this deserves the Co-developed-by tag.

> Signed-off-by: Florian Fainelli <florian.fainelli at broadcom.com>

...

> +               if (priv->suspended && bank->wake_active & (u32)status) {

Why casting?

> +                       priv->suspended = false;
> +                       pm_wakeup_event(&priv->pdev->dev, 0);
> +               }

...

>  static void brcmstb_gpio_shutdown(struct platform_device *pdev)
>  {
> +       struct brcmstb_gpio_priv *priv = dev_get_drvdata(&pdev->dev);

> +       /* disable interrupts */

A useless comment.

> +       if (priv->parent_irq > 0)
> +               disable_irq(priv->parent_irq);
> +
>         /* Enable GPIO for S5 cold boot */
> -       brcmstb_gpio_quiesce(&pdev->dev, false);
> +       brcmstb_gpio_quiesce(priv, false);
>  }

...

>  static const struct dev_pm_ops brcmstb_gpio_pm_ops = {

> +       .suspend_noirq = pm_sleep_ptr(brcmstb_gpio_suspend_noirq),
>         .resume_noirq = pm_sleep_ptr(brcmstb_gpio_resume),

May we use one of the PM macros for these two assignments?

>  };


-- 
With Best Regards,
Andy Shevchenko



More information about the linux-arm-kernel mailing list