[i2c] [PATCH 1/1] I2C pxa fast mode (400khz) support

David Brownell david-b at pacbell.net
Sat Jul 12 04:20:29 CEST 2008


On Thursday 10 July 2008, Ben Dooks wrote:
> On Thu, Jul 03, 2008 at 10:00:36AM +0800, Eric Miao wrote:
> > Jonathan Cameron wrote:
> > > Add fast_mode option to i2c_pxa_platform_data and use it to set the ICR_FM bit
> > > appropriately when i2c_pxa_reset is called. Parameter called fast_mode rather
> > > than frequency as this driver is also used for the i2c_pxa_pwr bus which has
> > > different normal and fast frequencies.
> > 
> > Maybe we should convert that (as well as 'use_pio') to a bit field to save
> > another byte.
> 
> I think use_pio and fast_mode could both be bits.

Or alternatively, "bool" ... which is usually a byte, and
on ARM will let GCC eliminate a comparision instruction.
Just load byte and branch on zero/nonzero, vs needing one
more instruction.  (In odd cases, it can be more important
to conserve the extra seven bits.)



More information about the i2c mailing list