Skip to contentSkip to conversation

PCI card char driver

DISCUSSION Irfan Hamid 1 participant 1 message Nov 7, 2002

lore
Share & tools
lore
#0 lore raw

I have to write a device driver for a PCI data acquisition device. So i startet writing a char driver for it. Problem is, now I'm confused, I mean, if its a pci device then i need to call register_pci_driver(struct pci_dev*), but a struct pci_dev* has only hooks like (*suspend) ( ), (*probe) ( ) etc... where do i fit in my read( ) / write( ) / ioctl( ) etc hooks?

I looked up some char driver sources, the only thing I could find was something called a struct misc_driver which contains a struct file_ops* and is registered using misc_register(struct misc_driver*). What am I missing here?

Regards,
Irfan.

PS: I have read "Linux Device Drivers" by Alessandro Rubini and also have it on hand. So if someone could point me to somewhere in that book it would be just as well. TIA.