mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[PATCH] PNPACPI: support shareable interrupts
ACPI supplies a "shareable" indication, but PNPACPI ignores it. If a PNP
device uses a shared interrupt, request_irq() fails because the PNP driver
can't tell whether to supply SA_SHIRQ.
This patch allows PNP drivers to test
(pnp_irq_flags(dev, 0) & IORESOURCE_IRQ_SHAREABLE)
Signed-off-by: Bjorn Helgaas <[email protected]>
Cc: Adam Belay <[email protected]>
Cc: Matthieu Castet <[email protected]>
Cc: Li Shaohua <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c61a8416ed
commit
c32928c579
2 changed files with 9 additions and 3 deletions
|
|
@ -74,7 +74,7 @@ static void decode_irq_flags(int flag, int *triggering, int *polarity)
|
|||
|
||||
static void
|
||||
pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, u32 gsi,
|
||||
int triggering, int polarity)
|
||||
int triggering, int polarity, int shareable)
|
||||
{
|
||||
int i = 0;
|
||||
int irq;
|
||||
|
|
@ -95,6 +95,9 @@ pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, u32 gsi,
|
|||
return;
|
||||
}
|
||||
|
||||
if (shareable)
|
||||
res->irq_resource[i].flags |= IORESOURCE_IRQ_SHAREABLE;
|
||||
|
||||
res->irq_resource[i].start = irq;
|
||||
res->irq_resource[i].end = irq;
|
||||
pcibios_penalize_isa_irq(irq, 1);
|
||||
|
|
@ -194,7 +197,8 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
|
|||
pnpacpi_parse_allocated_irqresource(res_table,
|
||||
res->data.irq.interrupts[i],
|
||||
res->data.irq.triggering,
|
||||
res->data.irq.polarity);
|
||||
res->data.irq.polarity,
|
||||
res->data.irq.sharable);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -255,7 +259,8 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
|
|||
pnpacpi_parse_allocated_irqresource(res_table,
|
||||
res->data.extended_irq.interrupts[i],
|
||||
res->data.extended_irq.triggering,
|
||||
res->data.extended_irq.polarity);
|
||||
res->data.extended_irq.polarity,
|
||||
res->data.extended_irq.sharable);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue