]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
i2c: designware: always clear interrupts before enabling them
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 13 May 2013 00:54:30 +0000 (00:54 +0000)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 17 May 2013 08:33:36 +0000 (10:33 +0200)
commit2a2d95e9d6d29e726cc294b65391917ed2e32bf4
tree9552a4071ced670790ffc5986e168485bb380ecb
parente6f34cea56f5b95498070eaa9f4aa3ba4a9e4f62
i2c: designware: always clear interrupts before enabling them

If the I2C bus is put to a low power state by an ACPI method it might pull
the SDA line low (as its power is removed). Once the bus is put to full
power state again, the SDA line is pulled back to high. This transition
looks like a STOP condition from the controller point-of-view which sets
STOP detected bit in its status register causing the driver to fail
subsequent transfers.

Fix this by always clearing all interrupts before we start a transfer.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
drivers/i2c/busses/i2c-designware-core.c