]> git.hungrycats.org Git - linux/commit
[PATCH] I2C: New parport bus drivers
authorJean Delvare <khali@linux-fr.org>
Wed, 14 Jan 2004 03:23:34 +0000 (19:23 -0800)
committerTom Rini <trini@kernel.crashing.org>
Wed, 14 Jan 2004 03:23:34 +0000 (19:23 -0800)
commite4de84054c6e8c8126bbdb0ab262828c190a05af
tree8a577b98ca93f2580202420aa6bbb4257e0b6d2b
parent7aea5de435cfa233a9e02dc7206d6756e96a5ed8
[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.
drivers/i2c/busses/Kconfig
drivers/i2c/busses/Makefile
drivers/i2c/busses/i2c-parport-light.c [new file with mode: 0644]
drivers/i2c/busses/i2c-parport.c [new file with mode: 0644]
drivers/i2c/busses/i2c-parport.h [new file with mode: 0644]