1. 13 Jul, 2016 1 commit
  2. 14 Oct, 2015 1 commit
    • Petri Gynther's avatar
      Input: improve autorepeat initialization · 027c71bb
      Petri Gynther authored
      Add new function input_enable_softrepeat() that allows drivers to
      initialize their own values for input_dev->rep[REP_DELAY] and
      input_dev->rep[REP_PERIOD], but also use the software autorepeat
      functionality from input.c.
      
      For example, a HID driver could do:
      
      static void xyz_input_configured(struct hid_device *hid,
                                       struct hid_input *hidinput)
      {
              input_enable_softrepeat(hidinput->input, 400, 100);
      }
      
      static struct hid_driver xyz_driver = {
              .input_configured = xyz_input_configured,
      }
      Signed-off-by: default avatarPetri Gynther <pgynther@google.com>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      027c71bb
  3. 10 Nov, 2012 1 commit
  4. 08 Nov, 2012 1 commit
    • Dmitry Torokhov's avatar
      Input: introduce managed input devices (add devres support) · 2be975c6
      Dmitry Torokhov authored
      There is a demand from driver's writers to use managed devices framework
      for their drivers. Unfortunately up to this moment input devices did not
      provide support for managed devices and that lead to mixing two styles
      of resource management which usually introduced more bugs, such as
      manually unregistering input device but relying in devres to free
      interrupt handler which (unless device is properly shut off) can cause
      ISR to reference already freed memory.
      
      This change introduces devm_input_allocate_device() that will allocate
      managed instance of input device so that driver writers who prefer
      using devm_* framework do not have to mix 2 styles.
      Reviewed-by: default avatarHenrik Rydberg <rydberg@euromail.se>
      Reviewed-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      2be975c6
  5. 13 Oct, 2012 1 commit
  6. 08 Oct, 2012 1 commit
  7. 19 Sep, 2012 2 commits
  8. 04 Jul, 2012 1 commit
    • Henrik Rydberg's avatar
      Input: MT - Include win8 support · cab7faca
      Henrik Rydberg authored
      The newly released HID protocol for win8 multitouch devices is capable
      of transmitting more information about each touch. In particular, it
      includes details useful for touch alignment. This patch completes the
      MT protocol with the ABS_MT_TOOL_X/Y events, and documents how to map
      win8 devices.
      
      Cc: Stephane Chatty <chatty@enac.fr>
      Cc: Benjamin Tissoires <benjamin.tissoires@enac.fr>
      Cc: Peter Hutterer <peter.hutterer@who-t.net>
      Acked-by: default avatarChase Douglas <chase.douglas@canonical.com>
      Signed-off-by: default avatarHenrik Rydberg <rydberg@euromail.se>
      cab7faca
  9. 12 Jun, 2012 1 commit
  10. 09 Feb, 2012 1 commit
  11. 03 Feb, 2012 1 commit
    • John Stultz's avatar
      Input: add infrastructure for selecting clockid for event time stamps · a80b83b7
      John Stultz authored
      As noted by Arve and others, since wall time can jump backwards, it is
      difficult to use for input because one cannot determine if one event
      occurred before another or for how long a key was pressed.
      
      However, the timestamp field is part of the kernel ABI, and cannot be
      changed without possibly breaking existing users.
      
      This patch adds a new IOCTL that allows a clockid to be set in the
      evdev_client struct that will specify which time base to use for event
      timestamps (ie: CLOCK_MONOTONIC instead of CLOCK_REALTIME).
      
      For now we only support CLOCK_MONOTONIC and CLOCK_REALTIME, but
      in the future we could support other clockids if appropriate.
      
      The default remains CLOCK_REALTIME, so we don't change the ABI.
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Reviewed-by: default avatarDaniel Kurtz <djkurtz@google.com>
      Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
      a80b83b7
  12. 12 Oct, 2011 1 commit
    • Dan Carpenter's avatar
      Input: force feedback - potential integer wrap in input_ff_create() · 05be8b81
      Dan Carpenter authored
      The problem here is that max_effects can wrap on 32 bits systems.
      We'd allocate a smaller amount of data than sizeof(struct ff_device).
      The call to kcalloc() on the next line would fail but it would write
      the NULL return outside of the memory we just allocated causing data
      corruption.
      
      The call path is that uinput_setup_device() get ->ff_effects_max from
      the user and sets the value in the ->private_data struct.  From there
      it is:
      -> uinput_ioctl_handler()
         -> uinput_create_device()
            -> input_ff_create(dev, udev->ff_effects_max);
      
      I've also changed ff_effects_max so it's an unsigned int instead of
      a signed int as a cleanup.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
      05be8b81
  13. 05 Oct, 2011 1 commit
  14. 24 Aug, 2011 1 commit
  15. 05 Aug, 2011 1 commit
  16. 04 Jul, 2011 1 commit
  17. 13 Apr, 2011 2 commits
    • Jeff Brown's avatar
      Input: evdev - indicate buffer overrun with SYN_DROPPED · 9fb0f14e
      Jeff Brown authored
      Add a new EV_SYN code, SYN_DROPPED, to inform the client when input
      events have been dropped from the evdev input buffer due to a
      buffer overrun.  The client should use this event as a hint to
      reset its state or ignore all following events until the next
      packet begins.
      Signed-off-by: default avatarJeff Brown <jeffbrown@android.com>
      [dtor@mail.ru: Implement Henrik's suggestion and drop old events in
       case of overflow.]
      Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
      9fb0f14e
    • Jarod Wilson's avatar
      Input: add KEY_IMAGES specifically for AL Image Browser · ba6a078b
      Jarod Wilson authored
      Many media center remotes have buttons intended for jumping straight to
      one type of media browser or another -- commonly, images/photos/pictures,
      audio/music, television, and movies. At present, remotes with an images
      or photos or pictures button use any number of different keycodes which
      sort of maybe fit. I've seen at least KEY_MEDIA, KEY_CAMERA,
      KEY_GRAPHICSEDITOR and KEY_PRESENTATION. None of those seem quite right.
      In my mind, KEY_MEDIA should be something more like a media center
      application launcher (and I'd like to standardize on that for things
      like the windows media center button on the mce remotes). KEY_CAMERA is
      used in a lot of webcams, and typically means "take a picture now".
      KEY_GRAPHICSEDITOR implies an editor, not a browser. KEY_PRESENTATION
      might be the closest fit here, if you think "photo slide show", but it
      may well be more intended for "run application in full-screen
      presentation mode" or to launch something like magicpoint, I dunno.
      And thus, I'd like to have a KEY_IMAGES, which matches the HID Usage AL
      Image Browser, the meaning of which I think is crystal-clear. I believe
      AL Audio Browser is already covered by KEY_AUDIO, and AL Movie Browser
      by KEY_VIDEO, so I'm also adding appropriate comments next to those
      keys.
      Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
      Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
      ba6a078b
  18. 28 Mar, 2011 1 commit
  19. 31 Jan, 2011 1 commit
  20. 11 Jan, 2011 1 commit
  21. 29 Dec, 2010 1 commit
  22. 20 Dec, 2010 1 commit
    • Henrik Rydberg's avatar
      Input: introduce device properties · 85b77200
      Henrik Rydberg authored
      Today, userspace sets up an input device based on the data it emits.
      This is not always enough; a tablet and a touchscreen may emit exactly
      the same data, for instance, but the former should be set up with a
      pointer whereas the latter does not need to. Recently, a new type of
      touchpad has emerged where the buttons are under the pad, which
      changes logic without changing the emitted data. This patch introduces
      a new ioctl, EVIOCGPROP, which enables user access to a set of device
      properties useful during setup. The properties are given as a bitmap
      in the same fashion as the event types, and are also made available
      via sysfs, uevent and /proc/bus/input/devices.
      Acked-by: default avatarPing Cheng <pingc@wacom.com>
      Acked-by: default avatarChase Douglas <chase.douglas@canonical.com>
      Acked-by: default avatarDmitry Torokhov <dtor@mail.ru>
      Signed-off-by: default avatarHenrik Rydberg <rydberg@euromail.se>
      85b77200
  23. 16 Dec, 2010 3 commits
  24. 15 Dec, 2010 1 commit
    • Dmitry Torokhov's avatar
      Input: define separate EVIOCGKEYCODE_V2/EVIOCSKEYCODE_V2 · ab4e0192
      Dmitry Torokhov authored
      The desire to keep old names for the EVIOCGKEYCODE/EVIOCSKEYCODE while
      extending them to support large scancodes was a mistake. While we tried
      to keep ABI intact (and we succeeded in doing that, programs compiled
      on older kernels will work on newer ones) there is still a problem with
      recompiling existing software with newer kernel headers.
      
      New kernel headers will supply updated ioctl numbers and kernel will
      expect that userspace will use struct input_keymap_entry to set and
      retrieve keymap data. But since the names of ioctls are still the same
      userspace will happily compile even if not adjusted to make use of the
      new structure and will start miraculously fail in the field.
      
      To avoid this issue let's revert EVIOCGKEYCODE/EVIOCSKEYCODE definitions
      and add EVIOCGKEYCODE_V2/EVIOCSKEYCODE_V2 so that userspace can explicitly
      select the style of ioctls it wants to employ.
      Reviewed-by: default avatarHenrik Rydberg <rydberg@euromail.se>
      Acked-by: default avatarJarod Wilson <jarod@redhat.com>
      Acked-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
      ab4e0192
  25. 01 Dec, 2010 2 commits
  26. 03 Nov, 2010 1 commit
  27. 09 Sep, 2010 1 commit
    • Mauro Carvalho Chehab's avatar
      Input: add support for large scancodes · 8613e4c2
      Mauro Carvalho Chehab authored
      Several devices use a high number of bits for scancodes. One important
      group is the Remote Controllers. Some new protocols like RC-6 define a
      scancode space of 64 bits.
      
      The current EVIO[CS]GKEYCODE ioctls allow replace the scancode/keycode
      translation tables, but it is limited to up to 32 bits for scancode.
      
      Also, if userspace wants to clean the existing table, replacing it by
      a new one, it needs to run a loop calling the ioctls over the entire
      sparse scancode space.
      
      To solve those problems, this patch extends the ioctls to allow drivers
      handle scancodes up to 32 bytes long (the length could be extended in
      the future should such need arise) and allow userspace to query and set
      scancode to keycode mappings not only by scancode but also by index.
      
      Compatibility code were also added to handle the old format of
      EVIO[CS]GKEYCODE ioctls.
      
      Folded fixes by:
      - Dan Carpenter: locking fixes for the original implementation
      - Jarod Wilson: fix crash when setting keycode and wiring up get/set
                      handlers in original implementation.
      - Dmitry Torokhov: rework to consolidate old and new scancode handling,
                         provide options to act either by index or scancode.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
      Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
      8613e4c2
  28. 05 Sep, 2010 1 commit
  29. 19 Aug, 2010 1 commit
  30. 02 Aug, 2010 2 commits
  31. 16 Jul, 2010 2 commits
  32. 23 Jun, 2010 1 commit
  33. 21 May, 2010 1 commit