summaryrefslogtreecommitdiff
path: root/drivers/of/property.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2022-03-31 15:54:50 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-04-05 15:30:47 +0200
commit99c63707bafd15bcf97fbd6bef1c92d5bfa01d28 (patch)
treed39bcbe8ab2391a96103f29e08268f90c73b3ecc /drivers/of/property.c
parent68b979d068d3d0dceb14c446f664433d96f20a7e (diff)
device property: Add irq_get to fwnode operation
Add irq_get() fwnode operation to implement fwnode_irq_get() through fwnode operations, moving the code in fwnode_irq_get() to OF and ACPI frameworks. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/of/property.c')
-rw-r--r--drivers/of/property.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/of/property.c b/drivers/of/property.c
index ac2aa5221069..9a50ad25906e 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1474,6 +1474,12 @@ static void __iomem *of_fwnode_iomap(struct fwnode_handle *fwnode, int index)
#endif
}
+static int of_fwnode_irq_get(const struct fwnode_handle *fwnode,
+ unsigned int index)
+{
+ return of_irq_get(to_of_node(fwnode), index);
+}
+
static int of_fwnode_add_links(struct fwnode_handle *fwnode)
{
struct property *p;
@@ -1512,6 +1518,7 @@ const struct fwnode_operations of_fwnode_ops = {
.graph_get_port_parent = of_fwnode_graph_get_port_parent,
.graph_parse_endpoint = of_fwnode_graph_parse_endpoint,
.iomap = of_fwnode_iomap,
+ .irq_get = of_fwnode_irq_get,
.add_links = of_fwnode_add_links,
};
EXPORT_SYMBOL_GPL(of_fwnode_ops);