[i2c] [PATCH] Add polling transfer for i2c-pxa

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Nov 15 09:58:03 CET 2007


On Wed, Nov 14, 2007 at 09:21:59AM +0200, Mike Rapoport wrote:
> Fixed (hopefully :) ).

Can we not re-use the existing interrupt handler code?  IOW, poll
the status register to indicate an interrupt and then manually call
the irq service handler.

I don't see any point in having two sets of different code in the
same driver for handling the same hardware - from the bug fixing
point of view that's a recipe for problems.

> +			/* I2C activity is ongoing. */
> +			/* FIXME: may be we should take the lock and
> +			   abandon ongoing transfer */

Probably not a good idea - some I2C devices provide an "atomic update"
facility where the accumulated state change when the STOP occurs.



More information about the i2c mailing list