/* The UCB1x00 can generate interrupts when the SIBCLK is stopped. Since we need to read an internal register, we must re-enable SIBCLK to talk to the chip. We leave the clock running until we have finished processing all interrupts from the chip.  */
static irqreturn_t ucb1x00_irq(int irqnr, void *devid)
/* The UCB1x00 can generate interrupts when the SIBCLK is stopped. Since we need to read an internal register, we must re-enable SIBCLK to talk to the chip. We leave the clock running until we have finished processing all interrupts from the chip.  */
static irqreturn_t ucb1x00_irq(int irqnr, void *devid)
{
	struct ucb1x00 *ucb = devid;
	struct ucb1x00_irq *irq;
	unsigned int isr, i;
	ucb1x00_enable(ucb);
	isr = ucb1x00_reg_read(ucb, UCB_IE_STATUS);
	ucb1x00_reg_write(ucb, UCB_IE_CLEAR, isr);
	ucb1x00_reg_write(ucb, UCB_IE_CLEAR, 0);
	for (i = 0, irq = ucb->irq_handler; i < 16 && isr; i++, isr >>= 1, irq++)
		if (isr & 1 && irq->fn)
			irq->fn(i, irq->devid);
	ucb1x00_disable(ucb);
	return IRQ_HANDLED;
}