我正在编写一个linux内核模块,它接受N个real /dev/input/js#设备,并将它们作为一个/dev/input/js3设备代理。目前我的模块正在创建/dev/input/js3,很好,jstest对此很满意,但不是真正的应用程序。我猜是这样的,因为我的虚拟js3设备没有匹配的/dev/input/event#对。如何从我的模块创建一个?
下面是我的模块的源代码,它可能有许多问题,但大部分都是有效的:https://github.com/iamtakingiteasy/unijoy/blob/master/unijoy.c
发布于 2013-07-28 22:35:46
下面是一个示例,您可以使用
1. class_create to create the class specified for the device,
2. device_create to create the device node
3. cdev_init to initialize and 
4. cdev_add to add the device to the /dev list例如,您可以参考以下链接:Create a device node in kernel module
https://stackoverflow.com/questions/17889975
复制相似问题