One more thing, > +static irqreturn_t zxi2c_irq_handle(int irq, void *dev_id) > +{ > + struct zxi2c *i2c = (struct zxi2c *)dev_id; > + void __iomem *regs = i2c->regs; > + u8 status = zxi2c_get_irq_status(regs); > + > + if ((status & ZXI2C_STS_MASK) == 0) > + return IRQ_NONE; > + > + if (status & ZXI2C_SCL_TIMEOUT) > + dev_warn(i2c->dev, "timeout(HW), ID: 0x%X\n", i2c->addr); > + > + if (status & ZXI2C_STS_ADDRNACK) { > + dev_dbg(i2c->dev, "addr NACK, ID: 0x%X\n", i2c->addr); > + } else if (status & ZXI2C_STS_BYTEEND) { > + i2c->byte_left--; > + if (!i2c->is_read) { > + if (zxi2c_is_nack(regs)) { > + status = ZXI2C_STS_BYTENACK; > + i2c->byte_left++; > + dev_err(i2c->dev, "data NACK, ID: 0x%X\n", > + i2c->addr); form these dev_warn, dev_dbg, dev_err in an irq context, what worries me is that if something goes wrong you would flood the dmesg with error/warning/debug messages. How about using dev_err_ratelimited() dev_warn_ratelimited() dev_dbg_ratelimited() ? Andi > + } else if (i2c->byte_left == 0 && i2c->is_last_msg) { > + zxi2c_stop_wr(regs); > + } > + } > + } > + > + i2c->event = status; > + zxi2c_clear_status(regs); > + wake_up(&i2c->waitq); > + > + return IRQ_HANDLED; > +}