static __init void pnpacpi_parse_ext_irq_option(struct pnp_dev *dev, unsigned int option_flags, struct acpi_resource_extended_irq *p) { int i; pnp_irq_mask_t map; unsigned char flags; if (p->interrupt_count == 0) return; bitmap_zero(map.bits, PNP_IRQ_NR); for (i = 0; i < p->interrupt_count; i++) { if (p->interrupts[i]) { if (p->interrupts[i] < PNP_IRQ_NR) __set_bit(p->interrupts[i], map.bits); else dev_err(&dev->dev, "ignoring IRQ %d option " "(too large for %d entry bitmap)\n", p->interrupts[i], PNP_IRQ_NR); } } flags = irq_flags(p->triggering, p->polarity, p->sharable); pnp_register_irq_resource(dev, option_flags, &map, flags); }
static void pnpacpi_parse_allocated_irqresource(struct pnp_dev *dev, u32 gsi, int triggering, int polarity, int shareable) { int irq, flags; int p, t; if (!valid_IRQ(gsi)) { pnp_add_irq_resource(dev, gsi, IORESOURCE_DISABLED); return; } if (!acpi_get_override_irq(gsi, &t, &p)) { t = t ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE; p = p ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH; if (triggering != t || polarity != p) { dev_warn(&dev->dev, "IRQ %d override to %s, %s\n", gsi, t ? "edge":"level", p ? "low":"high"); triggering = t; polarity = p; } } flags = irq_flags(triggering, polarity, shareable); irq = acpi_register_gsi(&dev->dev, gsi, triggering, polarity); if (irq >= 0) pcibios_penalize_isa_irq(irq, 1); else flags |= IORESOURCE_DISABLED; pnp_add_irq_resource(dev, irq, flags); }
static __init void pnpacpi_parse_irq_option(struct pnp_dev *dev, unsigned int option_flags, struct acpi_resource_irq *p) { int i; pnp_irq_mask_t map; unsigned char flags; if (p->interrupt_count == 0) return; bitmap_zero(map.bits, PNP_IRQ_NR); for (i = 0; i < p->interrupt_count; i++) if (p->interrupts[i]) __set_bit(p->interrupts[i], map.bits); flags = irq_flags(p->triggering, p->polarity, p->sharable); pnp_register_irq_resource(dev, option_flags, &map, flags); }
static void pnpacpi_parse_ext_irq_option(struct pnp_option *option, struct acpi_resource_ext_irq *p) { int i; struct pnp_irq * irq; if (p->number_of_interrupts == 0) return; irq = pnpacpi_kmalloc(sizeof(struct pnp_irq), GFP_KERNEL); if (!irq) return; for(i = 0; i < p->number_of_interrupts; i++) if (p->interrupts[i]) __set_bit(p->interrupts[i], irq->map); irq->flags = irq_flags(p->edge_level, p->active_high_low); pnp_register_irq_resource(option, irq); return; }
static void pnpacpi_parse_ext_irq_option(struct pnp_option *option, struct acpi_resource_extended_irq *p) { int i; struct pnp_irq *irq; if (p->interrupt_count == 0) return; irq = kcalloc(1, sizeof(struct pnp_irq), GFP_KERNEL); if (!irq) return; for(i = 0; i < p->interrupt_count; i++) if (p->interrupts[i]) __set_bit(p->interrupts[i], irq->map); irq->flags = irq_flags(p->triggering, p->polarity); pnp_register_irq_resource(option, irq); return; }