Re: [PATCH v2 06/13] ACPI: resources: Add wake_capable parameter to acpi_dev_irq_flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux