[i2c] [patch 2.6.24-rc1-git] i2c-algo-bit, don't yield()

Jean Delvare khali at linux-fr.org
Tue Nov 20 22:09:03 CET 2007


Hi David,

On Sun, 18 Nov 2007 18:06:07 -0800, David Brownell wrote:
> The codes aren't part of any on-the-wire protocol, they're just
> in the programming interface.  That's why I suggested a new file.

Good point.

> 
> Another option being Documentation/DocBook/kernel-api.tmpl in the
> i2c-specific section.  That has distinct advantages, although for
> some reason many people seem to overlook that documentation.

DocBook is fine with me.

> > > seems compatible with the driver model probe code, where both that
> > > and -ENXIO are treated as "normal" errors not worthy of diagnostics.
> > > 
> > > Likewise, a standard code is needed for arbitration lost.  It could
> > > be reported any time master transmit mode is used, not just in the
> > > send-an-address stage.  Maybe -EAGAIN would suit, it already has
> > > the right kind of message; or -EBUSY, or -EALREADY.
> > 
> > I think -EAGAIN is more suitable, as it is a temporary error, while
> > -EBUSY suggests a permanent one.
> 
> OK.  Of course, auditing drivers to make sure they report the right
> values there will take quite a long time.  One place to start would
> be making sure these codes aren't used to mean something different.
> 
> That's something Mr. Grep could help us with; it'd be a bit easier
> to make be sure of that than to be sure that for example ENODEV
> comes back from a probe failure despite convoluted error paths.

Agreed. We'll do our best, and if we miss something, we'll wait for
users to complain.

-- 
Jean Delvare



More information about the i2c mailing list