gameport and USB joysticks/gamepads
How is the gameport_register_port() supposed to be called for USB devices? There doesn't seem to be any kernel hook for that. Is it supposed to happen in userspace?
Also, it seems to me that gameport_register_device is always going to add a null pointer (dev->node) to the gameport_dev_list, and that doesn't seem terribly useful. What's the purpose of that?
Hi!
Quoted 3 lines
How is the
gameport_register_port()supposed to be called for USB devices? There doesn't seem to be any kernel hook for that. Is it supposed to happen in userspace?
you should use gameport_register_port() only to hardware game ports (e.g. those found on soundcards).
USB joysticks don't need a gameport, so USB joystick drivers should call directly input_register_device().
Quoted 3 lines
Also, it seems to me that
gameport_register_deviceis always going to add a null pointer (dev->node) to thegameport_dev_list, and that doesn't seem terribly useful. What's the purpose of that?
'node' is a kernel style linked list (struct list_head). I don't know any URL which explains how it works but you may find it in Robert Love's Linux Kernel Development book.
--
Aristeu