[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: getting data from a pci driver
Hi,
> I have a doubt regarding the PCI driver. After probing the pci device
> we can get data from the device through write or inb function. How
> does the application get data from the driver? Do we implement read
> and write functions? If so how to actually implement. I went through
> two or three driver codes but none implemented the read and write
> functions. Any pointers to a driver code which implements this will be
> helpful.
>
PCI is just an interface that is used by devices to connect to the system. So typically you do not write a "PCI driver", but you write a driver for an ethernet card that connects to a PCI slot. So the driver would pci_register_driver() to attach to PCI subsystem, and upon finding an appropriate device, would do register_netdev() ... and what ever. And yes, you can export data to userland by sysfs / procfs etc..
Thanks,
Rajat
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ