[PATCHv2] mc13xxx: Add i2c support for mc13xxx-core

Marc Reilly marc at cpdesign.com.au
Fri Dec 17 01:44:34 EST 2010


Hi,

> >      (BTW, did you fix the dependencies?  Currently you need to depend
> >      on I2C && SPI.  (Not sure these are the correct names, you may want
> >      to double check that.))
> 
> Be careful, this is a subtle issue. You will get unresolved symbols if your
> chip is connected via SPI, and <driver>=y, SPI=y, together with I2C=m. Been
> there.
> 
How quickly a "simple" patch gets complicated. :)

Am I right in thinking that in the above scenario (assuming it was coerced 
into compiling) the mc13xxx i2c driver would never get registered even after 
the i2c module is insmod'ed?

Sounds like the only way to handle this is by splitting the spi and i2c... 

> >      This is more flexible but IMHO not worth the effort.
> 
> I had to do it back then :( I wondered if there couldn't be a generic way
> to deal with SPI+I2C-drivers, never got to investigate it, though.
> 

Looking at some of the other mfd drivers, it seems that's the way they've gone 
too.

> Also, be sure to CC i2c- and spi-lists when you do the next version.

Will do.

Cheers,
Marc




More information about the linux-arm-kernel mailing list