Bas Wijnen schrieb: > On Mon, Jul 27, 2009 at 12:28:32PM +0200, Nils Faerber wrote: >> Bas Wijnen schrieb: >>> For the kernel I'm writing, Iris, I have a better keyboard driver than >>> the code in 2.6. On average it responds faster to keys, and it takes >>> less processor time. I'm writing the details here, so they can be >>> ported to Linux if anyone is interested. The essential parts are >>> interrupts: >> I think I missed some parts of that thread, what is Iris? > That's a long story, which I've told in a separate, long, e-mail. :-)
Oh, gotto dig that out again then ;) >> I also reworked the JZ keypad driver to a large extend: > I was very happy to see that. I wanted to use code along these lines, > but wasn't sure if it could work. Appearantly it could. :-) Is there a > reason to set the column pin to 1 before setting it to input? I copied > that part of the driver, but it seems useless. It is useless but the hardware seems to require it. The problem is that "charging" the wires and uncharging them can leave a little charge on the wire which can be misinterpreted as pressed key. I first tried without but it gave false readings some times. Since you are using interrupts you might get along without it though. With polling I charge and uncharge the wires with the polling frequency which is comparibly high. >> Though I also still do not use interrupts... but it work quite well now. > > Yes, the problem that using interrupts solves is the amount of cpu time > that scanning uses. With interrupts, you don't need to scan when no > keys are pressed. It also gives slightly faster response times to most > key events, but that isn't important, as the response time is fast > enough with about 20 scans per second. Yes, I know. I just did not wrap my head enough around JZ4730 interrupts to do that yet ;) > Thanks, > Bas Cheers nils faerber -- kernel concepts GbR Tel: +49-271-771091-12 Sieghuetter Hauptweg 48 Fax: +49-271-771091-19 D-57072 Siegen Mob: +49-176-21024535 http://www.kernelconcepts.de _______________________________________________ Mipsbook-devel mailing list Mipsbook-devel@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/mipsbook-devel