LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 01-13-2009, 12:45 AM   #1
sunr2007
Member
 
Registered: Jan 2009
Location: Bangalore , India
Distribution: Fedora 12
Posts: 65

Rep: Reputation: 17
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
 
Old 01-13-2009, 01:24 AM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 4
Posts: 4,305

Rep: Reputation: 205Reputation: 205Reputation: 205
Please don't double post!
 
Old 01-13-2009, 09:00 AM   #3
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,451

Rep: Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172
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.
 
Old 01-13-2009, 03:56 PM   #4
AustinMarton
Member
 
Registered: May 2007
Location: New Zealand
Distribution: Fedora at home, Ubuntu 10.04 at work
Posts: 88

Rep: Reputation: 16
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.
 
Old 01-15-2009, 01:40 AM   #5
sunr2007
Member
 
Registered: Jan 2009
Location: Bangalore , India
Distribution: Fedora 12
Posts: 65

Original Poster
Rep: Reputation: 17
@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.
 
  


Reply

Tags
driver, keyboard


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write vga card driver and lcd driver? bobby1112 Programming 2 09-29-2006 06:20 PM
How I can write winmodem driver? LinLove Linux - Hardware 1 05-31-2006 08:11 PM
how to write to keyboard buffer vineeth789 Programming 1 01-11-2006 04:30 PM
latin keyboard to write in japonese setlec_seta Linux - Software 0 01-22-2005 12:41 PM
How to write a Vietnamese keyboard program for Linux Namhh Linux - Software 2 10-15-2003 09:31 AM


All times are GMT -5. The time now is 03:21 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration