2002-11-07 08:02:45

by Irfan Hamid

[permalink] [raw]
Subject: PCI card char driver

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.