[i2c] Early access to power management I2C on PXA
eric.y.miao at gmail.com
Wed Oct 31 01:40:38 CET 2007
On 10/31/07, David Brownell <david-b at pacbell.net> wrote:
> On Tuesday 30 October 2007, Mike Rapoport wrote:
> > > 2. And obviously the original I2C code does not bear in mind the polling
> > > mode so there will be some other modifications to make, which may or
> > > may not cause incompatibility with current code.
> > >
> > > take, for example, mutex_lock() before a transfer may no longer be
> > > compatible with polling mode since it might_sleep(), which is not
> > > supposed to be called within interrupt context
> > Indeed, but I think it's possible to change i2c-core in a way compatible with
> > current code.
> For those discussions I'd think i2c at lm-sensors.org would be
> the relevant mailing list ... yes?
ok, add i2c at lm-sensors.org in the loop, assuming you all have
subscribed to it.
> And the issue would be more like "how to issue and complete
> I2C calls when IRQs are off". The need for lowlevel polling
> is just one of the issues that come up there.
> I'd not be surprised to find that the best current answer is
> what Russell mentioned: not using the current I2C framework.
> Anything else seems likely to be a lot of work, and there's
> a lot of inertia behind that current framework.
Indeed this is a good solution.
But david, let me summarize: the problem here is that if other I2C devices
are attached to the same I2C bus as well as the Power Management IC,
and providing people still want to use the current I2C framework to access
those other I2C devices, which the consequence you will have is:
a dedicated polling API will _have to_ co-exist with the current I2C framework
which leads to many other problems.
> - Dave
More information about the i2c