Lines Matching refs:ipd
368 static void rk3x_i2c_handle_start(struct rk3x_i2c *i2c, unsigned int ipd) in rk3x_i2c_handle_start() argument
370 if (!(ipd & REG_INT_START)) { in rk3x_i2c_handle_start()
372 dev_warn(i2c->dev, "unexpected irq in START: 0x%x\n", ipd); in rk3x_i2c_handle_start()
396 static void rk3x_i2c_handle_write(struct rk3x_i2c *i2c, unsigned int ipd) in rk3x_i2c_handle_write() argument
398 if (!(ipd & REG_INT_MBTF)) { in rk3x_i2c_handle_write()
400 dev_err(i2c->dev, "unexpected irq in WRITE: 0x%x\n", ipd); in rk3x_i2c_handle_write()
415 static void rk3x_i2c_handle_read(struct rk3x_i2c *i2c, unsigned int ipd) in rk3x_i2c_handle_read() argument
423 if (!(ipd & REG_INT_MBRF)) in rk3x_i2c_handle_read()
449 static void rk3x_i2c_handle_stop(struct rk3x_i2c *i2c, unsigned int ipd) in rk3x_i2c_handle_stop() argument
453 if (!(ipd & REG_INT_STOP)) { in rk3x_i2c_handle_stop()
455 dev_err(i2c->dev, "unexpected irq in STOP: 0x%x\n", ipd); in rk3x_i2c_handle_stop()
478 unsigned int ipd; in rk3x_i2c_irq() local
482 ipd = i2c_readl(i2c, REG_IPD); in rk3x_i2c_irq()
484 dev_warn(i2c->dev, "irq in STATE_IDLE, ipd = 0x%x\n", ipd); in rk3x_i2c_irq()
489 dev_dbg(i2c->dev, "IRQ: state %d, ipd: %x\n", i2c->state, ipd); in rk3x_i2c_irq()
492 ipd &= ~(REG_INT_BRF | REG_INT_BTF); in rk3x_i2c_irq()
494 if (ipd & REG_INT_NAKRCV) { in rk3x_i2c_irq()
502 ipd &= ~REG_INT_NAKRCV; in rk3x_i2c_irq()
509 if ((ipd & REG_INT_ALL) == 0) in rk3x_i2c_irq()
514 rk3x_i2c_handle_start(i2c, ipd); in rk3x_i2c_irq()
517 rk3x_i2c_handle_write(i2c, ipd); in rk3x_i2c_irq()
520 rk3x_i2c_handle_read(i2c, ipd); in rk3x_i2c_irq()
523 rk3x_i2c_handle_stop(i2c, ipd); in rk3x_i2c_irq()