bif: qpnp-bsi: request BSI interrupts with level high triggering

Request the BSI RX, TX and ERR interrupts using level high
triggering instead of rising edge triggering.  If an interrupt
is edge triggered, then its interrupt handler will be called upon
enabling the interrupt if it physically triggered while it was
disabled in software.  This leads to unexpected interrupt
handler calls in the qpnp-bsi driver when the following sequence
occurs: BIF transaction using interrupts (IRQs enabled), BIF
transaction using polling (IRQs disabled), BIF transaction to
enter interrupt mode bus state (IRQs enabled).

Switching the interrupts to use level triggering fixes the issue
because any interrupt physically triggered during a polling
transaction with the BSI interrupts disabled will be ignored by
the irq framework.

Change-Id: I57a6fb6f75af14970b5a186009ec506e240c151d
Signed-off-by: David Collins <collinsd@codeaurora.org>
This commit is contained in:
David Collins 2013-11-21 11:23:14 -08:00
parent 069376c1fe
commit fcea656ff7

View file

@ -1560,7 +1560,7 @@ static int qpnp_bsi_init_irqs(struct qpnp_bsi_chip *chip,
int rc;
rc = devm_request_irq(dev, chip->irq[QPNP_BSI_IRQ_ERR],
qpnp_bsi_isr, IRQF_TRIGGER_RISING, "bsi-err", chip);
qpnp_bsi_isr, IRQF_TRIGGER_HIGH, "bsi-err", chip);
if (rc < 0) {
dev_err(dev, "%s: request for bsi-err irq %d failed, rc=%d\n",
__func__, chip->irq[QPNP_BSI_IRQ_ERR], rc);
@ -1575,7 +1575,7 @@ static int qpnp_bsi_init_irqs(struct qpnp_bsi_chip *chip,
}
rc = devm_request_irq(dev, chip->irq[QPNP_BSI_IRQ_RX],
qpnp_bsi_isr, IRQF_TRIGGER_RISING, "bsi-rx", chip);
qpnp_bsi_isr, IRQF_TRIGGER_HIGH, "bsi-rx", chip);
if (rc < 0) {
dev_err(dev, "%s: request for bsi-rx irq %d failed, rc=%d\n",
__func__, chip->irq[QPNP_BSI_IRQ_RX], rc);
@ -1590,7 +1590,7 @@ static int qpnp_bsi_init_irqs(struct qpnp_bsi_chip *chip,
}
rc = devm_request_irq(dev, chip->irq[QPNP_BSI_IRQ_TX],
qpnp_bsi_isr, IRQF_TRIGGER_RISING, "bsi-tx", chip);
qpnp_bsi_isr, IRQF_TRIGGER_HIGH, "bsi-tx", chip);
if (rc < 0) {
dev_err(dev, "%s: request for bsi-tx irq %d failed, rc=%d\n",
__func__, chip->irq[QPNP_BSI_IRQ_TX], rc);