[i2c] Good example of why we need "new style" I2C ... [was: Re: [PATCH 1/5] powerpc: generic time suspend/resume code]

David Brownell david-b at pacbell.net
Thu Mar 22 01:05:03 CET 2007


On Wednesday 21 March 2007 3:48 pm, you wrote:
> On Wed, 21 Mar 2007, David Brownell wrote:
> 
> > (*) Most of the I2C based RTCs rely on kernel command line parameters,
> >     because of the vagaries of I2C.  "New style" I2C drivers will replace
> >     command line declarations ("rv5c386 RTC on bus 0 at address 0x32")
> >     with ones in the board specific init logic.
> 
> [OT] I know very well what you mean! After my recent patch i2c-pxa driver 
> on PXA27x CPUs supports both i2c buses. Now, there are chips, like pcf8574 
> that specify 16 (!) addresses in their normal list. Which means, to use it 
> on a pxa27x with one such chip on 1 address and to avoid scanning them all 
> and flooding your log with terrifying error messages (smth like "retries 
> exhausted", I think), you have to specify an "ignore" list on the kernel 
> command line / modprobe parameter with a list of (16 - 1)*2 + 16*2 = 62 
> comma separated values (e.g., if it's on 0,0x20: 
> ignore=0,0x21,...1,0x20,1,0x21,...)!... Which even exceeds max length of 
> the ignore array. So, I had to double its length. Of course, changes like 
> that I don't submit to the mainline:-)))

Yoiks!  Scarey bad-example.  I'm cc'ing it to the i2c list,
in case folk there are interested.  ;)


> Looking forward to your reworked i2c.

http://khali.linux-fr.org/devel/linux-2.6/jdelvare-i2c/

has a working snapshot of all this, and I see it's also found
in the 2.6.21-rc4-mm1 patchset.

- Dave


> Thanks
> Guennadi
> ---
> Guennadi Liakhovetski
> 



More information about the i2c mailing list