summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-10-07 15:51:59 +0200
committerMark Brown <broonie@linaro.org>2013-10-07 15:51:59 +0200
commit896182ad319542e56dcf776565f92cb35c2b4abb (patch)
tree8316c3d1de4600908461a6c246c410b9c4502264 /drivers/spi
parentMerge remote-tracking branch 'spi/fix/mpc512x' into spi-linus (diff)
parentspi/pxa2xx: check status register as well to determine if the device is off (diff)
downloadlinux-896182ad319542e56dcf776565f92cb35c2b4abb.tar.xz
linux-896182ad319542e56dcf776565f92cb35c2b4abb.zip
Merge remote-tracking branch 'spi/fix/pxa' into spi-linus
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-pxa2xx.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 2eb06ee0b326..c1a50674c1e3 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -546,8 +546,17 @@ static irqreturn_t ssp_int(int irq, void *dev_id)
if (pm_runtime_suspended(&drv_data->pdev->dev))
return IRQ_NONE;
- sccr1_reg = read_SSCR1(reg);
+ /*
+ * If the device is not yet in RPM suspended state and we get an
+ * interrupt that is meant for another device, check if status bits
+ * are all set to one. That means that the device is already
+ * powered off.
+ */
status = read_SSSR(reg);
+ if (status == ~0)
+ return IRQ_NONE;
+
+ sccr1_reg = read_SSCR1(reg);
/* Ignore possible writes if we don't need to write */
if (!(sccr1_reg & SSCR1_TIE))