.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * ACPI GSI IRQ layer |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2015 ARM Ltd. |
---|
5 | 6 | * Author: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify |
---|
8 | | - * it under the terms of the GNU General Public License version 2 as |
---|
9 | | - * published by the Free Software Foundation. |
---|
10 | 7 | */ |
---|
11 | 8 | #include <linux/acpi.h> |
---|
12 | 9 | #include <linux/irq.h> |
---|
.. | .. |
---|
196 | 193 | fwnode = acpi_gsi_domain_id; |
---|
197 | 194 | acpi_irq_parse_one_match(fwnode, irq->interrupts[ctx->index], |
---|
198 | 195 | irq->triggering, irq->polarity, |
---|
199 | | - irq->sharable, ctx); |
---|
| 196 | + irq->shareable, ctx); |
---|
200 | 197 | return AE_CTRL_TERMINATE; |
---|
201 | 198 | case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: |
---|
202 | 199 | eirq = &ares->data.extended_irq; |
---|
.. | .. |
---|
209 | 206 | fwnode = acpi_get_irq_source_fwhandle(&eirq->resource_source); |
---|
210 | 207 | acpi_irq_parse_one_match(fwnode, eirq->interrupts[ctx->index], |
---|
211 | 208 | eirq->triggering, eirq->polarity, |
---|
212 | | - eirq->sharable, ctx); |
---|
| 209 | + eirq->shareable, ctx); |
---|
213 | 210 | return AE_CTRL_TERMINATE; |
---|
214 | 211 | } |
---|
215 | 212 | |
---|
.. | .. |
---|
295 | 292 | acpi_irq_model = model; |
---|
296 | 293 | acpi_gsi_domain_id = fwnode; |
---|
297 | 294 | } |
---|
| 295 | + |
---|
| 296 | +/** |
---|
| 297 | + * acpi_irq_create_hierarchy - Create a hierarchical IRQ domain with the default |
---|
| 298 | + * GSI domain as its parent. |
---|
| 299 | + * @flags: Irq domain flags associated with the domain |
---|
| 300 | + * @size: Size of the domain. |
---|
| 301 | + * @fwnode: Optional fwnode of the interrupt controller |
---|
| 302 | + * @ops: Pointer to the interrupt domain callbacks |
---|
| 303 | + * @host_data: Controller private data pointer |
---|
| 304 | + */ |
---|
| 305 | +struct irq_domain *acpi_irq_create_hierarchy(unsigned int flags, |
---|
| 306 | + unsigned int size, |
---|
| 307 | + struct fwnode_handle *fwnode, |
---|
| 308 | + const struct irq_domain_ops *ops, |
---|
| 309 | + void *host_data) |
---|
| 310 | +{ |
---|
| 311 | + struct irq_domain *d = irq_find_matching_fwnode(acpi_gsi_domain_id, |
---|
| 312 | + DOMAIN_BUS_ANY); |
---|
| 313 | + |
---|
| 314 | + if (!d) |
---|
| 315 | + return NULL; |
---|
| 316 | + |
---|
| 317 | + return irq_domain_create_hierarchy(d, flags, size, fwnode, ops, |
---|
| 318 | + host_data); |
---|
| 319 | +} |
---|
| 320 | +EXPORT_SYMBOL_GPL(acpi_irq_create_hierarchy); |
---|