[PATCH] I2C: New parport bus drivers
These are replacements for the i2c-philips-par, i2c-elv and i2c-velleman drivers, as well as for the i2c-old i2c-parport driver as found under drivers/media/video in linux 2.4. My reason for writing them, as already discussed on the sensors and linux-kernel mailing-lists, is that all these drivers basically do the same thing, so I thought it would be easier to maintain a single driver instead of four. As Simon Vogl pointed out that using a direct I/O access (as done in i2c-elv and i2c-velleman) could be prefered over clean parport access (as done in i2c-philips-par) on embedded devices, I finally wrote two drivers instead of one. But both drivers support all devices, it's just a matter of how they are accessed (and wether the driver depends on the parport driver). I made it so that the definition of the adapters (i.e. how to set and get SDA and SCL, basically) is completely separated from the code itself. Thus, adding support for a new adapter is simply adding a new set of data to the definition table, describing how the adapter works, in a single file. This means that all simple parallel port adapters are virtually supported. The i2c-pport driver we have in i2c CVS isn't supported yet because it works a bit differently, but I believe that extending the current driver(s) to support it should be possible (although it can be discussed wether it's worth it). You'll have to pass the type parameter that is correct for your board: 0 = Philips 2 = Velleman 3 = ELV 4 = ADM evaluation board I could only test with my ADM eval board, and it worked OK with both drivers. If they are confirmed to work, we could get rid of all other parallel port i2c drivers in 2.6. *** I think we should mark the i2c-philips-par, i2c-elv and i2c-velleman drivers as "deprecated" in i2c/busses/Kconfig. Is there a standard way to do so (like there is "&& EXPERIMENTAL" for new drivers)? Thanks.
Showing
Please register or sign in to comment