[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YyC8C+ZH57xHYLQd@smile.fi.intel.com>
Date: Tue, 13 Sep 2022 20:21:15 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Raul E Rangel <rrangel@...omium.org>
Cc: linux-acpi@...r.kernel.org, linux-input@...r.kernel.org,
jingle.wu@....com.tw, mario.limonciello@....com, timvp@...gle.com,
linus.walleij@...aro.org, hdegoede@...hat.com, rafael@...nel.org,
Dan Williams <dan.j.williams@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Len Brown <lenb@...nel.org>,
Terry Bowman <terry.bowman@....com>,
Wolfram Sang <wsa@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 06/13] ACPI: resources: Add wake_capable parameter to
acpi_dev_irq_flags
On Mon, Sep 12, 2022 at 04:13:10PM -0600, Raul E Rangel wrote:
> ACPI IRQ/Interrupt resources contain a bit that describes if the
> interrupt should wake the system. This change exposes that bit via
> a new IORESOURCE_IRQ_WAKECAPABLE flag. Drivers should check this flag
> before arming an IRQ to wake the system.
...
> static inline void acpi_irq_parse_one_match(struct fwnode_handle *fwnode,
> u32 hwirq, u8 triggering,
> u8 polarity, u8 shareable,
> + u8 wake_capable,
> struct acpi_irq_parse_one_ctx *ctx)
This function is used only in scope of a single C-file. Why instead not
converting it to use some internal structure and acpi_irq_parse_one_cb()
becomes like:
struct internal_struct s;
switch (ares->type) {
case ACPI_RESOURCE_TYPE_IRQ:
...fill internal_struct...
break;
case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
...fill internal_struct...
break;
default:
return AE_OK;
acpi_irq_parse_one_match(&s);
return AE_CTRL_TERMINATE;
?
...
> + acpi_dev_get_irqresource(res,
> + ext_irq->interrupts[index],
> + ext_irq->triggering,
> + ext_irq->polarity,
> + ext_irq->shareable,
> + ext_irq->wake_capable, false);
Ditto.
Actually it can be shared structure for these too.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists