Attached is a patch for detecting lost arbitration via the PCF8584 algorithm adapter. The documentation from Philips is not clear on the topic, and it seems I could be checking the LAB bit more frequently, but this seems to do the trick on a system for which I am developing I2C support-- any comments on these modifications for multi-master friendliness? The result of this patch is that callers of the master_xfer function pointer will receive -EINTR when work has been interrupted by a detected lost arbitration. Checking the lost arbitration (LAB) bit is done only in wait_for_pin(). This -EINTR bubbles-up all the way to the callers of the i2c library functions for accessing the bus and smarter callers should be able to retry as appropriate for their task-- this does, however, prevent the master_xfer routine from returning the number of messages successfully sent; I'm not sure where the best tradeoff could be made, given the API (and the fact that I seem to be the only person who would find this useful) but I suppose lost arbitration could just become another anonymous failure mode and we continue to report back the number of successful messages sent. Any comments? Many thanks, E -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: pcf8584_lab.patch Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20050218/9142ea8b/attachment.pl