Hi,
An Usb driver can be a char driver or block driver or Network driver based on the hardware peripheral attached. Similarly a PCI driver can be a char driver or block driver or network driver.
Code:
int usb_register(struct usb_driver *d);
void usb_deregister(struct usb_driver *d);
If I am right then we are having separate device driver register/unregister functions for USB driver and also char driver, block driver, network driver. Similarly for PCI driver
Code:
int pci_register_driver(struct pci_driver *drv);
void pci_unregister_driver(struct pci_driver *drv);
along with char driver, block driver, network driver. So if I am going to implement USB as char driver can I use register /unregister functions of char driver?
Code:
int register_chrdev_region(dev_t first, unsigned int count, char *name);
void unregister_chrdev_region(dev_t first, unsigned int count);
if not so what is the reason of having special register/unregister functions of USB/PCI drivers and what is the difference between general char/block/network driver functions and USB/PCI/... drivers for some specific type of interfaces?
Please help!