0

i am writing a linux kernel module which takes N of real /dev/input/js# devices and proxifies them as a single /dev/input/js3 device. Currently my module is creating /dev/input/js3 just fine, jstest is happy with it, but not the real applications. I guess (strace'd) it is so because i have no matching pair of /dev/input/event# for my virtual js3 device. How do i create one from my module?

Here is my module's source, which probably has numerous of issues, but mostly working: https://github.com/iamtakingiteasy/unijoy/blob/master/unijoy.c

Alexander Tumin
  • 1,561
  • 4
  • 22
  • 33

1 Answers1

0

Here is an example, you can use

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

For example you can refer the below link :Create a device node in kernel module

Santosh A
  • 5,173
  • 27
  • 37
  • You can also refer http://stackoverflow.com/questions/5970595/create-a-device-node-in-code this for more understanding – Santosh A Jul 28 '13 at 14:36