On 21/01/13 17:09, Michael Jones wrote: > I would also like to point out that SMBus 2.0 Section 5.5.1 documents > Quick Command, which is composed as: > > S | Slave Address | Rd/Wr | A | P > > which has no data. If this were performed with i2c_transaction_tx, > there is no way to know with the current API if the command was error > free by using the return value. > > If the i2c API could return a negative integer, -1 could be used to > indicate errors like NACK, arbitration loss, timeout, etc.
I entirely agree that being able to report errors through the i2c API is desirable, and it's one of the issues I run into when implementing the Kinetis i2c driver. For example, there is no way to report when the bus is busy, so the driver ends up just waiting for the bus to become free -- this is not always desirable behaviour, as discussed in http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001397. Tomas