OESF Portables Forum
General Forums => General Discussion => Topic started by: markluk41 on April 16, 2006, 06:48:29 pm
-
Hi,
I need some help on the keyboard device driver of my SL6000 (running the stock SHARP ROM, 2.4.18-rmk7-pxa3-embedix). Any information would be much appreciated.
What I'm trying to do is to modify (or write a new one) the keyboard kernel device driver, so that it would do some addition processing before passing it on to the application. Unfortunately, I'm not sure where to start.
My first question is: how do I identify the current keyboard driver? How do I know if it's in the kernel or its a loadable module? I have the source code of the kernel from the folks where I bought the Zaurus from (http://familiar.sdgsystems.com/pub/zaurus/sl6000/). But how do I know that the source code corresponds to the kernel on my actual Zaurus?
thanks
-
What sort o processing, it might be a better idea to do it outside the kernel
-
The processing I need involves turning off other interrupts, so it probably needs to stay in the kernel.
When i do a dmesg to look at boot messages, I see a line of printouts that seems to pertain to the keyboard
keyboard initilaized.
I greped through the kernel source for this line (it especially helped since "initialized" was misspelled), and grep gave me the following results
root@sparrow:/home/mluk/linuxK# grep -Ri "keyboard initilaized." *
grep: drivers/char/collie_keyb.c: printk("keyboard initilaized.\n");
drivers/char/corgi_keyb.c: printk("keyboard initilaized.\n");
drivers/char/discovery_keyb.c: printk("keyboard initilaized.\n");
drivers/char/poodle_keyb.c: printk("keyboard initilaized.\n");
drivers/char/tosa_keyb.c: printk("keyboard initilaized.\n");
From what I read online, collie, corgi, poodle are codenames for different branches of the Sharp Zaurus development. In particular, it seems like 'tosa' corresponds to SL6000.
So, I'm guessing that tosa_keyb.c is the corresponding driver for my keyboard. Would I be on the right track if I just make my modifications to this file, make a module out of it, and insmod it?
thanks
-
I think, from what I've read, the 6000 keyboard is a trivial matrix of keys wired to the general purpose I/O on the processor - there's no keyboard controller chip as far as I see it.
This is a shame, 'cos it means its wastes a lot of useful I/O in the zaurus. But it probably saved Sharp a few pence on not using a separate chip (I would have used a usb keyboard interface, fitted an internal hub, and thus made the device more expandable).
BTW, why didn't you ask in the 6000 specific forum?
-
The PXA chips have a built in Keyboard matrix scanning function thats mapped to a couple of IO's
I dont ntink this is 6000 specic, its more a general kernel programming question that we dont have a fourm for
anyway i thoght that interupts under linux were very short, bassically enogh for you to move the data out of the buffers you then trigger a 'worker' thread that does all the bulk processing but instead of jumping to it right away you add it to the list of things to do so that when the interupt finishes it can do the work right away (provided another interupt dosent occur, which is the reason for this whole setup)
toso = 6000 AFAIK
yes thats where you should add your code but can you give us an idea of what it does? are you trying to make hotkeys? or changing the keymap?, there may be an ellegant sullution or patch to the problem already, you might want to try an updated kerenl for example