Re: gameport and USB joysticks/gamepads

From: Aristeu Sergio Rozanski Filho
Date: Tue Dec 07 2004 - 05:57:20 EST


Hi!
> 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().

> 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?
'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

Attachment: signature.asc
Description: Digital signature