/* Do 0-length transaction using bit-banging through IIC_DIRECTCNTL register.  */
static int iic_dc_wait(volatile struct iic_regs __iomem *iic, u8 mask)
/* Do 0-length transaction using bit-banging through IIC_DIRECTCNTL register.  */
static int iic_dc_wait(volatile struct iic_regs __iomem *iic, u8 mask)
{
	unsigned long x = jiffies + HZ / 28 + 2;
	while ((in_8(&iic->directcntl) & mask) != mask){
		if (unlikely(time_after(jiffies, x)))
			return -1;
		cond_resched();
	}
	return 0;
}