/* this is the low level routine to read/write a bit on the One Wire interface on the hardware. It does write 0 if parameter bit is set to 0, otherwise a write 1/read.  */
static u8 mxc_w1_ds2_touch_bit(void *data, u8 bit)
/* this is the low level routine to read/write a bit on the One Wire interface on the hardware. It does write 0 if parameter bit is set to 0, otherwise a write 1/read.  */
static u8 mxc_w1_ds2_touch_bit(void *data, u8 bit)
{
	struct mxc_w1_device *mdev = data;
	void __iomem *ctrl_addr = mdev->regs + MXC_W1_CONTROL;
	unsigned int timeout_cnt = 400; 
	__raw_writeb((1 << (5 - bit)), ctrl_addr);
	while (timeout_cnt--) {
		if (!((__raw_readb(ctrl_addr) >> (5 - bit)) & 0x1))
			break;
		udelay(1);
	}
	return ((__raw_readb(ctrl_addr)) >> 3) & 0x1;
}