[PATCH V3] i2c: add bcm2835 driver

Wolfram Sang wolfram at the-dreams.de
Tue Feb 12 05:27:44 EST 2013


> >> +	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 :)



More information about the linux-arm-kernel mailing list