lkml.org 
[lkml]   [2022]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2022-09-13 20:14    [W:0.150 / U:2.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site