[i2c] [patch 2.6.24-rc1-git] i2c-algo-bit, don't yield()
Jean Delvare
khali at linux-fr.org
Sun Nov 18 23:16:30 CET 2007
Hi David,
On Fri, 16 Nov 2007 10:29:25 -0800, David Brownell wrote:
> On Thursday 15 November 2007, Jean Delvare wrote:
> > > Remove the "retry address stage" mechanism from i2c-algo-bit. That
> > > mechanism is not something that upper level code can rely on; hardly
> > > any I2C adapter drivers implement it, much less do it correctly.
> >
> > Adapters which do not implement it, or do not implement it correctly,
> > do _not_ use i2c-algo-bit, so that comment is hardly relevant for a
> > patch that only touches i2c-algo-bit. It would be more suitable for the
> > future patch that will remove the structure field.
>
> The reason the comment is there is because it shows part of the
> Big Picture motivating patches removing this mechanism.
>
>
> > Just kill try_address and call i2c_outb() directly?
>
> Not at this time. This is the natural place to put that
> information about how I2C and SMBus have different rules,
> which arguably merits a programming abstraction in its own
> right...
Arguably, this difference between I2C and SMBus is not specific to
i2c-algo-bit so this documentation doesn't really belong to that file.
But if you insist on including it here (which is fine with me), I fail
to see why the same comment shouldn't go right before bit_doAddress.
>
>
> > The rest looks good.
>
> So, you can update that typo directly. :)
>
>
> > i2c-algo-pcf needs a similar update, can you please submit a patch?
>
> Appended.
>
> - Dave
>
> =======
> Remove i2c_adapter->retries support from i2c-algo-pcf ... this compiles,
> but is untested. The paths for ten bit addressing look especially broken;
> they were also the only ones which would actually use those values.
Same code as in i2c-algo-bit, and equally broken. That's one of the
reasons why I wanted to kill 10-bit addressing support some times ago.
Oh, on second look, I have to agree with you... even more broken than
i2c-algo-bit. At this level of brokenness, I'd suggest that we plain
kill 10-bit addressing support from this driver; this happens to also
solve the retries issue, so all good.
--
Jean Delvare
More information about the i2c
mailing list