Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: tegra: fix repeated start handling

A repeated start should be used for all but the last msg in an xfer. The
NOSTART flag is for skipping the START frame (addr/rw)

Signed-off-by: Erik Gilling <konkers@android.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>

authored by

Erik Gilling and committed by
Ben Dooks
2078cf3b cb63c62d

+2 -2
+2 -2
drivers/i2c/busses/i2c-tegra.c
··· 451 451 452 452 packet_header = msg->addr << I2C_HEADER_SLAVE_ADDR_SHIFT; 453 453 packet_header |= I2C_HEADER_IE_ENABLE; 454 + if (!stop) 455 + packet_header |= I2C_HEADER_REPEAT_START; 454 456 if (msg->flags & I2C_M_TEN) 455 457 packet_header |= I2C_HEADER_10BIT_ADDR; 456 458 if (msg->flags & I2C_M_IGNORE_NAK) 457 459 packet_header |= I2C_HEADER_CONT_ON_NAK; 458 - if (msg->flags & I2C_M_NOSTART) 459 - packet_header |= I2C_HEADER_REPEAT_START; 460 460 if (msg->flags & I2C_M_RD) 461 461 packet_header |= I2C_HEADER_READ; 462 462 i2c_writel(i2c_dev, packet_header, I2C_TX_FIFO);