LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-11-2012, 05:14 AM   #1
kam_driver
LQ Newbie
 
Registered: Jul 2012
Posts: 4

Rep: Reputation: Disabled
Handling two devices with one driver


Hello Everyone,

Currently I am developing character driver for PCI devices. I want to support more than one devices in my driver, So I wanted to know few things:

Is only one instance of driver is enough or I need as many instances as devices ?
If only one is enough then how can I scan which device is connected to my host machine at driver load time ? Is there any kernel function/macro available for this purpose ?

Experts opinions/ideas or some useful links will be highly appreciated!!

Thanks,
 
Old 07-12-2012, 01:52 AM   #2
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
One driver can handle multiple devices

You can differentiate between the devices using their minor numbers.
 
Old 07-19-2012, 05:22 AM   #3
kam_driver
LQ Newbie
 
Registered: Jul 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks everyone for not posting reply to the post. Anyways, it is solved now.
 
Old 07-20-2012, 01:37 AM   #4
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
what update did you provide for the reply posted ?
Did you try using multiple minor numbers ? With out your updates no one can solve your issues.

Anyway, glad you solved the issue.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Handling Devices in kernel Panic Path storyb Linux - Kernel 1 07-04-2012 02:22 PM
Software for handling generic media devices. jaakkop Linux - Software 1 02-04-2007 10:22 AM
Handling several USB mass storage devices? KlaymenDK Mandriva 3 06-30-2004 12:04 PM
Red Hat not handling USB devices as well as Mandrake? Campitor Red Hat 1 10-24-2003 09:31 PM
handling devices sajanjohn Linux - General 1 04-20-2002 03:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:57 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