From: Tom R. <tr...@ke...> - 2002-07-15 14:34:22
|
On Sat, Jul 13, 2002 at 07:12:59PM +0200, Franz Sirl wrote: > On Samstag, 13. Juli 2002 16:40, Vojtech Pavlik wrote: > > On Sat, Jul 13, 2002 at 04:19:34PM +0200, Franz Sirl wrote: > > > > > Exactly. i8042.c has quite a few assumptions in it. It uses inb/out > > > > > instead of ioremap/readb/writeb, it assumes control and data register > > > > > are 4 addresses apart and it assumes no special sequences are > > > > > necessary to access these registers. > > > > > > > > Some time ago I thought about this when I looked at the sparc i8042 > > > > driver. I tried a few things but I didn't come up with a solution. > > > > > > What do you all think about the appended patch? With the strategy in the > > > patch it should be possible to initialize and use i8042 chips on pretty > > > much every platform without code duplication. > > > > > > The patch compiles on PPC (and thus should on x86 too), but I can't test > > > it cause I don't have access to the affected embedded boards. > > > > > > If you like the approach, please apply it to the linux-input repo after > > > testing on x86. > > > > A couple thoughs: > > > > 1) We could as well go back to using the asm/ include way, that way > > we'd have less ifdefs, etc. > > I don't think we would have many #ifdefs, hmm. With asm/ we would have > duplication of the header all over the place with nearly no difference. I > think in this case the maintainence burden is lower with the #ifdefs. Isn't that what include/asm-generic/foo.h is for? Or does that just get abused into doing things like: include/asm-$(ARCH)/foo.h /* * We don't need anything special. */ #include <asm-generic/foo.h> -- Tom Rini (TR1265) http://gate.crashing.org/~trini/ |