LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 06-19-2012, 06:58 AM   #1
dlh
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Rep: Reputation: Disabled
Device Driver - Hardware Dependent


Hi,

I am having trouble finding info which clearly states what files of existing drivers are hardware dependent. Is there a clear defined process for porting drivers to new hardware?

Say, for example, I want to write a SPI driver for a new chip with on board SPI hardware. What files do I need to alter to do this?

Thanks
 
Old 06-19-2012, 02:37 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
You should creart a new file for the SPI driver and modify it to match with your hardware.
 
Old 06-26-2012, 08:16 AM   #3
agencyDetective
LQ Newbie
 
Registered: May 2012
Posts: 13

Rep: Reputation: Disabled
Write the driver as normal - the only difference is in how the linux kernel access the driver routines.
Look at another driver source and copy it.
This is linux version dependent but normally its a static structure called dev that has function pointers to the driver routines.
Then you have to install it and linux will pick up the structure and be able to call the driver when needed.

Basically just copy how its been done in the distro you have - the trouble is its always changing as is linux
 
  


Reply



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
[SOLVED] Is hardware support kernel dependent? win_to_lin_migrant Linux - General 11 01-05-2012 03:51 PM
Resource / tutorial for Linux Device Driver and Hardware Info your_shadow03 Linux - Newbie 1 10-15-2011 11:15 PM
Ethernet device driver hardware rx- am I doing the right thing with my socket buffer? AustinMarton Linux - Kernel 1 02-25-2009 03:30 PM
Procedure for Update hardware (device) driver onemancrew Red Hat 3 08-25-2008 04:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:50 PM.

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