[i2c] [PATCH] i2c-pxa: fastmode support

Jonathan Cameron jic23 at cam.ac.uk
Fri Aug 1 12:06:12 CEST 2008

Ben Dooks wrote:
> On Thu, Jul 31, 2008 at 04:56:53PM +0100, Jonathan Cameron wrote:
>> From: Jonathan Cameron <jic23 at cam.ac.uk>
>> 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.
>> Signed-off-by: Jonathan Cameron <jic23 at cam.ac.uk>
>> --
>> This is basically a repost of the original patch with use_pio and fast_mode converted
>> to bit fields as suggested / agreed by Eric Miao and Ben Dooks.
> please ensure your descriptions are wrapped to less than 77 characters
> per line.
Will do, sorry about that bit of carelessness.
>>  extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info);
>> diff -uprN -X a/Documentation/dontdiff a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
>> --- a/drivers/i2c/busses/i2c-pxa.c	2008-07-31 12:02:42.000000000 +0100
>> +++ b/drivers/i2c/busses/i2c-pxa.c	2008-07-31 16:10:43.000000000 +0100
>> @@ -65,7 +65,8 @@ struct pxa_i2c {
>>  	unsigned long		iosize;
>>  	int			irq;
>> -	int			use_pio;
>> +	int			use_pio:1;
>> +	int			fast_mode:1;
>>  };
> Please use unsigned int for bitfields, and a space between the
> name and the :1 would be nice.
On this point, which is the standard way of doing this?
I'd normally go for a space before the colon, but it appears to be an
open issue from point of view of coding standards(and checkpatch throws a wobbly)

Not something I care about that much either way and I'm guessing by the would be
nice that you don't either. I'll repost the patch without.

Thanks for the comments,

Jonathan Cameron

More information about the i2c mailing list