Hi,
I would like to take advantages of the hardware TWI (I2C) functionality, which is available on the AT91SAM9G20. Therefore, I would like to write a Linux kernel module for it.
However, when reading the documentation in the Linux kernel source tree regarding TWI (Linux kernel 2.6.30.9), I see some "worrying" comments.
To start with, in the file /linux-2.6.30.9/drivers/i2c/busses/Kconfig, I read the following:
Quote:
config I2C_AT91
tristate "Atmel AT91 I2C Two-Wire interface (TWI)"
depends on ARCH_AT91 && EXPERIMENTAL && BROKEN
help
This supports the use of the I2C interface on Atmel AT91
processors.
This driver is BROKEN because the controller which it uses
will easily trigger RX overrun and TX underrun errors. Using
low I2C clock rates may partially work around those issues
on some systems. Another serious problem is that there is no
documented way to issue repeated START conditions, as needed
to support combined I2C messages. Use the i2c-gpio driver
unless your system can cope with those limitations.
Next, when looking into the file /linux-2.6.30.9/arch/arm/mach-at91/at91sam9260_devices.c, I see the following comment:
Quote:
/*
* Prefer the GPIO code since the TWI controller isn't robust
* (gets overruns and underruns under load) and can only issue
* repeated STARTs in one scenario (the driver doesn't yet handle them).
*/
Before I start to put some effort in that new driver, I would like to know if the above mentioned shortcomings are still valid.
Does anyone has any idea? If the shortcomings are still in place, are there ways to work around it (still using the HW TWI functionality available and not switching to a kind of bit-banging sSW TWI/I2C)?
Best rgds,
--Geert