]> git.baikalelectronics.ru Git - kernel.git/commit
device property: Introduce fwnode_irq_get()
authorMarcin Wojtas <mw@semihalf.com>
Thu, 18 Jan 2018 12:31:40 +0000 (13:31 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Jan 2018 15:57:04 +0000 (10:57 -0500)
commite397a4857f8ed82b150037618326bea48e2a546a
tree41132234dab217c94395fed1f1d628ee4a6d6e73
parentaf0e6d3c19d734a8c10dc838de9b025d22c5c67d
device property: Introduce fwnode_irq_get()

Until now there were two very similar functions allowing
to get Linux IRQ number from ACPI handle (acpi_irq_get())
and OF node (of_irq_get()). The first one appeared to be used
only as a subroutine of platform_irq_get(), which (in the generic
code) limited IRQ obtaining from _CRS method only to nodes
associated to kernel's struct platform_device.

This patch introduces a new helper routine - fwnode_irq_get(),
which allows to get the IRQ number directly from the fwnode
to be used as common for OF/ACPI worlds. It is usable not
only for the parents fwnodes, but also for the child nodes
comprising their own _CRS methods with interrupts description.

In order to be able o satisfy compilation with !CONFIG_ACPI
and also simplify the new code, introduce a helper macro
(ACPI_HANDLE_FWNODE), with which it is possible to reach
an ACPI handle directly from its fwnode.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/base/property.c
include/linux/acpi.h
include/linux/property.h