/* In interrupt mode, handle the interrupt. NOTE: Assumes data->lock is held.  */
static irqreturn_t pmcmsptwi_interrupt(int irq, void *ptr)
/* In interrupt mode, handle the interrupt. NOTE: Assumes data->lock is held.  */
static irqreturn_t pmcmsptwi_interrupt(int irq, void *ptr)
{
	struct pmcmsptwi_data *data = ptr;
	u32 reason = pmcmsptwi_readl(data->iobase +
					MSP_TWI_INT_STS_REG_OFFSET);
	pmcmsptwi_writel(reason, data->iobase + MSP_TWI_INT_STS_REG_OFFSET);
	dev_dbg(&pmcmsptwi_adapter.dev, "Got interrupt 0x%08x\n", reason);
	if (!(reason & MSP_TWI_INT_STS_DONE))
		return IRQ_NONE;
	data->last_result = pmcmsptwi_get_result(reason);
	complete(&data->wait);
	return IRQ_HANDLED;
}