1. Linux Hybrid device driver model
① in Linux systems, there are a class of character devices, which have the same main device number (10), but the second device number is different, we call this device a hybrid device (Miscdevice). All promiscuous devices form a linked list, and the kernel looks for the corresponding promiscuous device based on the secondary device number when accessing the device.
Using struct Miscdevice in ②linux to describe hybrid devices
struct Miscdevice { int minor; Const Char *name; Const struct file_operations *fops; struct list_head list; struct device *parent; struct device *this_device;};
③linux using the Misc_register function to register a hybrid device driver
int misc_register (struct miscdevice * misc)
④linux using the Misc_deregister function to unregister a hybrid device driver
int misc_deregister (struct miscdevice *misc)
Linux Hybrid device driver