LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How to write a keyboard driver? (https://www.linuxquestions.org/questions/linux-kernel-70/how-to-write-a-keyboard-driver-696899/)

sunr2007 01-12-2009 11:45 PM

How to write a keyboard driver?
 
How to write a keyboard driver with interrupt driven? the platform is ARM and the interface is SRAMC with I/O mapped. What should my handler and read fucntions contains? and I want to know how to map the memory by using the ioremap() function? when exactly we have to use mmap()can you please help me out with some kinda psuedo code.
warm regards,
Ravi Kulkarni:confused:

{BBI}Nexus{BBI} 01-13-2009 12:24 AM

Please don't double post!

sundialsvcs 01-13-2009 08:00 AM

The best way to write any driver, after carefully checking to see that it has not already been done, is ... "use the source, Luke!" Find devices that are similar to the one you're considering, and study their working drivers. Remember that, most of the time, "writing new software" actually consists of adapting what is already out there.

AustinMarton 01-13-2009 02:56 PM

Refer to the device driver writers bible - Linux Device Drivers published by O'Rielly. The second edition is available online here... http://www.xml.com/ldd/chapter/book/
If you are using a 2.6 kernel you might want to track down the third edition which is slightly updated.

sunr2007 01-15-2009 12:40 AM

@above all
 
Yeah thanks . I av started to learn the LDD3 from Oreilly. I want some help on how to write a interrupt handler and a read fucntion manually.my interface is SRAMC memory in ARM processor with I/O mapped. Im starting to write a read fucntion for my driver but still have some glitches about what exactly it should do ! so lookin for some suggestions on it.
warm regards,
Ravi Kulkarni.


All times are GMT -5. The time now is 04:55 PM.