[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75Vexw8P6EcyX=fpoH_SxHTzSahrb82GfUCgzpyK3ePEjhg@mail.gmail.com>
Date: Tue, 19 Oct 2021 13:04:21 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Mario Limonciello <mario.limonciello@....com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Basavaraj Natikar <Basavaraj.Natikar@....com>,
Shyam Sundar S K <Shyam-sundar.S-k@....com>,
"open list:PIN CONTROL SUBSYSTEM" <linux-gpio@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
Nehal Shah <Nehal-bakulchandra.Shah@....com>,
"Rafael J . Wysocki" <rjw@...ysocki.net>,
Joerie de Gram <j.de.gram@...il.com>
Subject: Re: [PATCH v2] pinctrl: amd: Fix wakeups when IRQ is shared with SCI
On Tue, Oct 19, 2021 at 6:27 AM Mario Limonciello
<mario.limonciello@....com> wrote:
>
> On some Lenovo AMD Gen2 platforms the IRQ for the SCI and pinctrl drivers
> are shared. Due to how the s2idle loop handling works, this case needs
> an extra explicit check whether the interrupt was caused by SCI or by
> the GPIO controller.
>
> To fix this rework the existing IRQ handler function to function as a
> checker and an IRQ handler depending on the calling arguments.
>
> BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1738
Should it have a Fixes tag?
> Reported-by: Joerie de Gram <j.de.gram@...il.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@....com>
...
> +#ifdef CONFIG_ACPI
__maybe_unused?
> +static bool amd_gpio_check_wake(void *dev_id)
> +{
> + return _amd_gpio_irq_handler(-1, dev_id);
> +}
> +#endif
...
> +#ifdef CONFIG_ACPI
> + acpi_register_wakeup_handler(gpio_dev->irq, amd_gpio_check_wake, gpio_dev);
> +#endif
Not what I expected.
...
> +#ifdef CONFIG_ACPI
> + acpi_unregister_wakeup_handler(amd_gpio_check_wake, gpio_dev);
> +#endif
Ditto.
Yes, I see the problem, perhaps you need to add the stubs. If this is
a real regression fix, then probably this patch should follow by two:
adding stubs, removing ugly ifdeffery here. Otherwise, introduce stubs
as patch 1 preceding this one in a series.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists