Thread (1 message) 1 message, 1 author, 2013-02-12

Re: [PATCH V3] i2c: add bcm2835 driver

From: Wolfram Sang <hidden>
Date: 2013-02-12 10:27:44
Also in: linux-arm-kernel, linux-i2c

quoted
quoted
+	ret = wait_for_completion_timeout(&i2c_dev->completion,
+					  BCM2835_I2C_TIMEOUT);
+	bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, BCM2835_I2C_C_CLEAR);
+	if (WARN_ON(ret == 0)) {
+		dev_err(i2c_dev->dev, "i2c transfer timed out\n");
+		return -ETIMEDOUT;
+	}
I'd suggest to skip the WARN_ON. Timeout is the expected case when you
want to read from an EEPROM which is just in the process of
erasing/writing data from the previous command.
I copied that from Tegra. Should that driver be changed too?
The suggestion applies to all drivers, yes :)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help