ACPI / spi: attach GPIO IRQ from ACPI description to SPI device

spi->irq was ignoring GpioInt property setting it to -1.
acpi_dev_gpio_irq_get returns and configure the slave IRQ according to
the ACPI slave node description.

It is now inline with devicetree behavior.

Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Christophe RICARD 2015-12-23 23:25:35 +01:00 committed by Rafael J. Wysocki
parent 52044723cd
commit 33ada67da3
1 changed files with 3 additions and 0 deletions

View File

@ -1623,6 +1623,9 @@ static acpi_status acpi_spi_add_device(acpi_handle handle, u32 level,
return AE_OK;
}
if (spi->irq < 0)
spi->irq = acpi_dev_gpio_irq_get(adev, 0);
adev->power.flags.ignore_parent = true;
strlcpy(spi->modalias, acpi_device_hid(adev), sizeof(spi->modalias));
if (spi_add_device(spi)) {