rcar-i2c: always reads a byte

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have noticed the following behaviour with the i2c-rcar driver
with the following single i2c_msg structure:

	msg[0].addr = 0x12;
	msg[0].flags = I2C_M_RD;
	msg[0].len = 0;
	msg[0].buf = data;

The system issues an address transaction followed by a single byte
read.

I have tried changing the code to not ack the read after the address
interrupt, however this causes the i2c block to hang forever.

i2c_recv_irq():

	if (priv->pos + 1 >= msg->len) {
		rcar_i2c_bus_phase(priv, RCAR_BUS_PHASE_STOP);
		if (msg->len != 0)
			rcar_i2c_status_bit_clear(priv, MAT | MDR);
		else
			rcar_i2c_status_bit_clear(priv, MAT);
	} else {
		rcar_i2c_bus_phase(priv, RCAR_BUS_PHASE_DATA);
		rcar_i2c_recv_restart(priv);
	}

--
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux