summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChristophe RICARD <christophe.ricard@gmail.com>2015-12-23 22:25:35 (GMT)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-01-01 02:20:25 (GMT)
commit33ada67da352e138b6dbb372dccad6c3f13b15b2 (patch)
tree6f2e018be0e6b1f5ed7ef7eff01354184857eeb4 /drivers
parent52044723cd27aed6dad655a3bdf6142a8239ce74 (diff)
downloadlinux-33ada67da352e138b6dbb372dccad6c3f13b15b2.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index dee1cb8..151b01c 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -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)) {