lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a7b2f013-965b-436d-95f0-8ce1e2ec0c41@broadcom.com>
Date: Thu, 22 Jan 2026 11:24:35 -0800
From: Florian Fainelli <florian.fainelli@...adcom.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: linux-kernel@...r.kernel.org, Doug Berger <opendmb@...il.com>,
 Broadcom internal kernel review list
 <bcm-kernel-feedback-list@...adcom.com>, Linus Walleij <linusw@...nel.org>,
 Bartosz Golaszewski <brgl@...nel.org>, Christophe Leroy
 <chleroy@...nel.org>, "open list:GPIO SUBSYSTEM"
 <linux-gpio@...r.kernel.org>,
 "moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE"
 <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 3/3] gpio: brcmstb: allow parent_irq to wake



On 1/21/2026 11:42 PM, Andy Shevchenko wrote:
> On Thu, Jan 22, 2026 at 3:06 AM Florian Fainelli
> <florian.fainelli@...adcom.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@...il.com>
>> [florian: port changes after generic gpio chip conversion]
> 
> Likewise in the previous patch I think this deserves the Co-developed-by tag.

OK.

> 
>> Signed-off-by: Florian Fainelli <florian.fainelli@...adcom.com>
> 
> ...
> 
>> +               if (priv->suspended && bank->wake_active & (u32)status) {
> 
> Why casting?

status is an unsigned long, which is what for_each_set_bit() expects, so 
it is intended here to ensure the top bits are not participating in the 
comparison, I think this is just being extra explicit with intent here.

> 
>> +                       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.

Indeed.

> 
>> +       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?

Sure, can do that!
-- 
Florian


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ