LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
LinkBack Search this Thread
Old 10-21-2007, 10:55 PM   #1
zvivered
Member
 
Registered: Sep 2007
Posts: 94

Rep: Reputation: 15
Device driver for embedded board


I have to write a linux device driver for a customized embedded board. The board contains flash, I2C controller, LEDs, discretes etc. All devices are memory mapped.
I have 2 alternatives:

1. The device driver will map (by implementing mmap) all memory IO space. This way the user space driver can access all peripherals.

2. Each device will have its own device driver and a user space driver. So I will create few *.ko files (not one as in the first alternative).

What is the optimal way ?

Thanks,
Zvika Vered.
 
Old 10-22-2007, 05:20 PM   #2
rsashok
Member
 
Registered: Nov 2006
Location: USA, CA
Distribution: RedHat, Debian
Posts: 202

Rep: Reputation: 31
Since you have totally different devices, I don't see much sense to map them in flat memory, and do everything at user level. I'd would have written device driver for each peripheral, and provided functions for user level to access these drivers. That would be more in spirit of true Linux, and potentially might save you few unexpected headaches. Having said that, I realize that each design is different, and might have specific requirements that don't fit in canonical model, use you own experience and utter perception of beauty while creating your design.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedded board for experimenting Linux proting and DD kirany Linux - Embedded 31 05-07-2009 10:33 AM
snort process gets killed on embedded board raklo Linux - Server 3 01-06-2007 06:26 AM
SuSE on an Embedded Soekris Board? jantman Linux - Hardware 3 01-01-2007 06:24 PM
power down on an embedded board knobby67 Debian 1 03-27-2006 06:35 AM
Can anyone recommend an Embedded computer board or chip? rjlee Linux - Hardware 5 09-13-2004 05:51 AM


All times are GMT -5. The time now is 07:48 AM.

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
Open Source Consulting | Domain Registration