mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* device-driver supporting more than one device
@ 2005-06-04  2:48 Ananda Krishnan
  2005-06-06  9:40 ` Lukasz Stelmach
  0 siblings, 1 reply; 2+ messages in thread
From: Ananda Krishnan @ 2005-06-04  2:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: veedutwous

Hi All,

  Can a device-driver (a generic serial driver)
support more than one device from different vendors
(hence different vendor ids and device ids)? If so,
during the boot time how the pci_device_id structure
gets the info about the drvier_data?  Would like to
know the name of the function name(s) and file(s) that
are used for this process.  Thanks a lot.

Ananda Krishnan


		
__________________________________ 
Discover Yahoo! 
Get on-the-go sports scores, stock quotes, news and more. Check it out! 
http://discover.yahoo.com/mobile.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: device-driver supporting more than one device
  2005-06-04  2:48 device-driver supporting more than one device Ananda Krishnan
@ 2005-06-06  9:40 ` Lukasz Stelmach
  0 siblings, 0 replies; 2+ messages in thread
From: Lukasz Stelmach @ 2005-06-06  9:40 UTC (permalink / raw)
  To: Ananda Krishnan; +Cc: linux-kernel, veedutwous

[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]

Ananda Krishnan napisał(a):
> Hi All,
> 
>   Can a device-driver (a generic serial driver)
> support more than one device from different vendors
> (hence different vendor ids and device ids)?

In general, yes. Does it apply to the particular driver you mentioned? I
don't know.

> If so,
> during the boot time how the pci_device_id structure
> gets the info about the drvier_data?  Would like to
> know the name of the function name(s) and file(s) that
> are used for this process.  Thanks a lot.

The driver contains IDs of hardware it supports. At the boot time
each driver registers itself providing this list. Then for each piece of
hardware supported by a particular driver .probe function is called.
You should definitly look at /usr/src/linux/drivers/usb/usb-skeleton.c.
However, it is a usb driver, pci seem to work in a similar manner.

You might also like to read this: http://lwn.net/Kernel/LDD3/

I am quite a newbie to kernel drivers so please correct me someone if I
am wrong.

-- 
Było mi bardzo miło.                    Trzecia pospolita klęska, [...]
>Łukasz<                      Już nie katolicka lecz złodziejska.  (c)PP


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-06  9:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-04  2:48 device-driver supporting more than one device Ananda Krishnan
2005-06-06  9:40 ` Lukasz Stelmach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®