Re: [PATCH] Force feedback support for uinput

aris_at_cefetpr.br
Date: 11/12/04

  • Next message: Nick Piggin: "Re: Kernel 2.6.9 Multiple Page Allocation Failures"
    Date:	Fri, 12 Nov 2004 10:09:12 -0200
    To: Micah Dowty <micah@navi.cx>
    
    

    > Hello,
    Hi!

    > This patch adds support to uinput for Linux's force feedback interface.
    > With these changes, it's possible to write drivers for force feedback
    > joysticks and similar devices in userspace. It also adds a way to set
    > the physical path of devices created via uinput, and it has a couple
    > trivial bugfixes.
    nice!

    > My solution is to have a special input event, outside the range
    > defined by the input system, that uinput sends to the application
    > to signal when a callback has been entered. A particular callback
    > invocation is identified by a request ID stored in this event.
    (snip)
    > +/* This is the new event type, used only by uinput.
    > + * 'code' is UI_FF_UPLOAD or UI_FF_ERASE, and 'value'
    > + * is the unique request ID. This number was picked
    > + * arbitrarily, above EV_MAX (since the input system
    > + * never sees it) but in the range of a 16-bit int.
    > + */
    > +#define EV_UINPUT 0x0101
    I guess it should be moved to input.h with other types of events.

    > +/* To write a force-feedback-capable driver, the upload_effect
    > + * and erase_effect callbacks in input_dev must be implemented.
    > + * The uinput driver will generate a fake input event when one of
    > + * these callbacks are invoked. The userspace code then uses
    > + * ioctls to retrieve additional parameters and send the return code.
    > + * The callback blocks until this return code is sent.
    (snip)
    what about moving this long comment to Documentation/input/uinput.txt?

    the rest of the patch seems fine to me

    thanks,

    (p.s.: sorry for the delay and the dup that will follow. my server is
    offline due adsl problems and the first answer is stuck there :)

    --
    Aristeu
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Nick Piggin: "Re: Kernel 2.6.9 Multiple Page Allocation Failures"

    Relevant Pages

    • [PATCH] Force feedback support for uinput
      ... This patch adds support to uinput for Linux's force feedback interface. ... to signal when a callback has been entered. ... ioctl() is performed to provide a return value and signal completion. ... +struct uinput_request { ...
      (Linux-Kernel)
    • Re: dev->release = (void (*)(struct device *))kfree;
      ... will still be unregistered (removed from the various lists) but the ... releasecallback won't be called until the last user. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [RFC/PATCH] sysfsify video4linux
      ... So the mandatory ->releasecallback version is also the ... Users might go for a while without realizing ... > that there really is a problem in their driver. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: OOPS in raid10.c:1448 in vanilla 2.6.13.2
      ... No more oops:) I hope these patches ... > note that sdc2 took the first empty slot. ... <snip the rest> ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: ioctl to keyboard device file
      ... > to write keyboard driver from it. ... Use Google to find example code on how to use uinput. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)