In some case, the log will look bad such as:
[ 12.393926] rk3x-i2c
ff150000.i2c: irq in STATE_IDLE, ipd = 0x51
[[[[[[[[[[[[.[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
Let's limit the printk:
[ 180.446547] rk3x_i2c_irq:
1726030 callbacks suppressed
[ 180.446592] rk3x-i2c
ff150000.i2c: irq in STATE_IDLE, ipd = 0x51
Change-Id: Ie91163ad3085e5dba127790b50e3beb359510120
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
ipd = i2c_readl(i2c, REG_IPD);
if (i2c->state == STATE_IDLE) {
- dev_warn(i2c->dev, "irq in STATE_IDLE, ipd = 0x%x\n", ipd);
+ dev_warn_ratelimited(i2c->dev,
+ "irq in STATE_IDLE, ipd = 0x%x\n",
+ ipd);
rk3x_i2c_clean_ipd(i2c);
goto out;
}