Lines Matching full:irq

3  * ACPI GSI IRQ layer
9 #include <linux/irq.h>
19 * acpi_gsi_to_irq() - Retrieve the linux irq number for a given GSI
20 * @gsi: GSI IRQ number to map
21 * @irq: pointer where linux IRQ number is stored
23 * irq location updated with irq value [>0 on success, 0 on failure]
28 int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) in acpi_gsi_to_irq() argument
34 *irq = irq_find_mapping(d, gsi); in acpi_gsi_to_irq()
36 * *irq == 0 means no mapping, that should be reported as a in acpi_gsi_to_irq()
39 if (!*irq && acpi_gsi_to_irq_fallback) in acpi_gsi_to_irq()
40 *irq = acpi_gsi_to_irq_fallback(gsi); in acpi_gsi_to_irq()
42 return (*irq > 0) ? 0 : -EINVAL; in acpi_gsi_to_irq()
47 * acpi_register_gsi() - Map a GSI to a linux IRQ number
48 * @dev: device for which IRQ has to be mapped
49 * @gsi: GSI IRQ number
53 * Returns: a valid linux IRQ number on success
60 unsigned int irq; in acpi_register_gsi() local
72 irq = irq_create_fwspec_mapping(&fwspec); in acpi_register_gsi()
73 if (!irq) in acpi_register_gsi()
76 return irq; in acpi_register_gsi()
81 * acpi_unregister_gsi() - Free a GSI<->linux IRQ number mapping
82 * @gsi: GSI IRQ number
87 int irq; in acpi_unregister_gsi() local
94 irq = irq_find_mapping(d, gsi); in acpi_unregister_gsi()
95 irq_dispose_mapping(irq); in acpi_unregister_gsi()
100 * acpi_get_irq_source_fwhandle() - Retrieve fwhandle from IRQ resource source.
102 * @gsi: GSI IRQ number
105 * Retrieve the fwhandle of the device referenced by the given IRQ resource
137 * Context for the resource walk used to lookup IRQ resources.
149 * acpi_irq_parse_one_match - Handle a matching IRQ resource.
151 * @hwirq: hardware IRQ number
160 * Handle a matching IRQ resource by populating the given ctx with
186 * the _CRS method. We only inspect IRQ resources. Since IRQ resources
188 * one's interrupt array, otherwise we subtract the current resource IRQ
195 * IRQ resource was found.
201 struct acpi_resource_irq *irq; in acpi_irq_parse_one_cb() local
207 irq = &ares->data.irq; in acpi_irq_parse_one_cb()
208 if (ctx->index >= irq->interrupt_count) { in acpi_irq_parse_one_cb()
209 ctx->index -= irq->interrupt_count; in acpi_irq_parse_one_cb()
212 fwnode = acpi_get_gsi_domain_id(irq->interrupts[ctx->index]); in acpi_irq_parse_one_cb()
213 acpi_irq_parse_one_match(fwnode, irq->interrupts[ctx->index], in acpi_irq_parse_one_cb()
214 irq->triggering, irq->polarity, in acpi_irq_parse_one_cb()
215 irq->shareable, irq->wake_capable, ctx); in acpi_irq_parse_one_cb()
245 * the appropriate ACPI IRQ resource and populating the given struct irq_fwspec
262 * acpi_irq_get - Lookup an ACPI IRQ resource and use it to initialize resource.
264 * @index: ACPI IRQ resource index to lookup
265 * @res: Linux IRQ resource to initialize
268 * Look for the ACPI IRQ resource with the given index and use it to initialize
269 * the given Linux IRQ resource.
274 * -EPROBE_DEFER if the IRQ lookup/conversion failed
327 * acpi_irq_create_hierarchy - Create a hierarchical IRQ domain with the default
329 * @flags: Irq domain flags associated with the domain