Skip to contentSkip to conversation

device-driver supporting more than one device

DISCUSSION Ananda Krishnan 2 participants 2 messages Jun 4, 2005 – Jun 6, 2005

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

Ananda Krishnan napisał(a):

Quoted 5 lines

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.

Quoted 5 lines

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.

Signature · 1 line
Było mi bardzo miło.                    Trzecia pospolita klęska, [...]
Quoted 1 line

Łukasz< Już nie katolicka lecz złodziejska. (c)PP