1. 31 1月, 2019 2 次提交
  2. 17 7月, 2018 1 次提交
  3. 10 1月, 2018 1 次提交
    • D
      Input: extend usable life of event timestamps to 2106 on 32 bit systems · 152194fe
      Deepa Dinamani 提交于
      The input events use struct timeval to store event time, unfortunately
      this structure is not y2038 safe and is being replaced in kernel with
      y2038 safe structures.
      
      Because of ABI concerns we can not change the size or the layout of
      structure input_event, so we opt to re-interpreting the 'seconds' part
      of timestamp as an unsigned value, effectively doubling the range of
      values, to year 2106.
      
      Newer glibc that has support for 32 bit applications to use 64 bit
      time_t supplies __USE_TIME_BITS64 define [1], that we can use to present
      the userspace with updated input_event layout. The updated layout will
      cause the compile time breakage, alerting applications and distributions
      maintainers to the issue. Existing 32 binaries will continue working
      without any changes until 2038.
      
      Ultimately userspace applications should switch to using monotonic or
      boot time clocks, as realtime clock is not very well suited for input
      event timestamps as it can go backwards (see a80b83b7 "Input: evdev -
      add CLOCK_BOOTTIME support" by by John Stultz). With monotonic clock the
      practical range of reported times will always fit into the pair of 32
      bit values, as we do not expect any system to stay up for a hundred
      years without a single reboot.
      
      [1] https://sourceware.org/glibc/wiki/Y2038ProofnessDesignSuggested-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDeepa Dinamani <deepa.kernel@gmail.com>
      Acked-by: NPeter Hutterer <peter.hutterer@who-t.net>
      Patchwork-Id: 10148083
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      152194fe
  4. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX license identifier to uapi header files with a license · e2be04c7
      Greg Kroah-Hartman 提交于
      Many user space API headers have licensing information, which is either
      incomplete, badly formatted or just a shorthand for referring to the
      license under which the file is supposed to be.  This makes it hard for
      compliance tools to determine the correct license.
      
      Update these files with an SPDX license identifier.  The identifier was
      chosen based on the license information in the file.
      
      GPL/LGPL licensed headers get the matching GPL/LGPL SPDX license
      identifier with the added 'WITH Linux-syscall-note' exception, which is
      the officially assigned exception identifier for the kernel syscall
      exception:
      
         NOTE! This copyright does *not* cover user programs that use kernel
         services by normal system calls - this is merely considered normal use
         of the kernel, and does *not* fall under the heading of "derived work".
      
      This exception makes it possible to include GPL headers into non GPL
      code, without confusing license compliance tools.
      
      Headers which have either explicit dual licensing or are just licensed
      under a non GPL license are updated with the corresponding SPDX
      identifier and the GPLv2 with syscall exception identifier.  The format
      is:
              ((GPL-2.0 WITH Linux-syscall-note) OR SPDX-ID-OF-OTHER-LICENSE)
      
      SPDX license identifiers are a legally binding shorthand, which can be
      used instead of the full boiler plate text.  The update does not remove
      existing license information as this has to be done on a case by case
      basis and the copyright holders might have to be consulted. This will
      happen in a separate step.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.  See the previous patch in this series for the
      methodology of how this patch was researched.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e2be04c7
  5. 21 3月, 2017 1 次提交
    • R
      HID: sony: Report DS4 motion sensors through a separate device · 227c011b
      Roderick Colenbrander 提交于
      The DS4 motion sensors are currently mapped by the hid-core driver
      to non-existing axes in between ABS_MISC and ABS_MT_SLOT, because
      the device already exhausted ABS_X-ABS_RZ. For a part the mapping
      by hid-core is accomplished by a fixup in hid-sony as the motion
      axes actually use vendor specific usage pages.
      
      This patch makes the DS4 use a separate input device for the motion
      sensors and reports acceleration data through ABS_X-ABS_Z and
      gyroscope data through ABS_RX-ABS_RZ. In addition it extends the
      event spec to allow gyroscope data through ABS_RX-ABS_RZ when
      INPUT_PROP_ACCELEROMETER is set. This change was suggested by
      Peter Hutterer during a discussion on linux-input.
      
      [jkosina@suse.cz: rebase onto slightly newer codebase]
      Signed-off-by: NRoderick Colenbrander <roderick.colenbrander@sony.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      227c011b
  6. 17 8月, 2016 1 次提交
  7. 19 6月, 2016 1 次提交
  8. 11 3月, 2016 1 次提交
  9. 27 10月, 2015 1 次提交
    • D
      Input: evdev - add event-mask API · 06a16293
      David Herrmann 提交于
      Hardware manufacturers group keys in the weirdest way possible. This may
      cause a power-key to be grouped together with normal keyboard keys and
      thus be reported on the same kernel interface.
      
      However, user-space is often only interested in specific sets of events.
      For instance, daemons dealing with system-reboot (like systemd-logind)
      listen for KEY_POWER, but are not interested in any main keyboard keys.
      Usually, power keys are reported via separate interfaces, however,
      some i8042 boards report it in the AT matrix. To avoid waking up those
      system daemons on each key-press, we had two ideas:
       - split off KEY_POWER into a separate interface unconditionally
       - allow filtering a specific set of events on evdev FDs
      
      Splitting of KEY_POWER is a rather weird way to deal with this and may
      break backwards-compatibility. It is also specific to KEY_POWER and might
      be required for other stuff, too. Moreover, we might end up with a huge
      set of input-devices just to have them properly split.
      
      Hence, this patchset implements the second idea: An event-mask to specify
      which events you're interested in. Two ioctls allow setting this mask for
      each event-type. If not set, all events are reported. The type==0 entry is
      used same as in EVIOCGBIT to set the actual EV_* mask of filtered events.
      This way, you have a two-level filter.
      
      We are heavily forward-compatible to new event-types and event-codes. So
      new user-space will be able to run on an old kernel which doesn't know the
      given event-codes or event-types.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      06a16293
  10. 17 10月, 2015 3 次提交
  11. 21 3月, 2015 1 次提交
    • C
      Input: add MT_TOOL_PALM · a736775d
      Charlie Mooney 提交于
      Currently there are only two "tools" that can be specified by a multi-touch
      driver: MT_TOOL_FINGER and MT_TOOL_PEN. In working with Elan (The touch
      vendor) and discussing their next-gen devices it seems that it will be
      useful to have more tools so that their devices can give the upper layers
      of the stack hints as to what is touching the sensor.
      
      In particular they have new experimental firmware that can better
      differentiate between palms vs fingertips and would like to plumb a patch
      so that we can use their hints in higher-level gesture soft- ware.  The
      firmware on the device can reasonably do a better job of palm detection
      because it has access to all of the raw sensor readings as opposed to just
      the width/pressure/etc that are exposed by the driver.  As such, the
      firmware can characterize what a palm looks like in much finer-grained
      detail and this change would allow such a device to share its findings with
      the kernel.
      Signed-off-by: NCharlie Mooney <charliemooney@chromium.org>
      Acked-by: NPeter Hutterer <peter.hutterer@who-t.net>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      a736775d
  12. 07 3月, 2015 1 次提交
  13. 05 3月, 2015 1 次提交
    • D
      HID: map telephony usage page · f3dddf24
      Dmitry Torokhov 提交于
      Currently HID code maps usages from telephony page into BTN_0, BTN_1, etc
      keys which get interpreted by mousedev and userspace as left/right/middle
      button clicks, which is not really helpful.
      
      This change adds mappings for usages that have corresponding input event
      definitions, and leaves the rest unmapped. This can be changed when
      there are userspace consumers for more telephony usages.
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      f3dddf24
  14. 29 1月, 2015 1 次提交
  15. 21 10月, 2014 1 次提交
  16. 09 9月, 2014 1 次提交
  17. 28 4月, 2014 1 次提交
  18. 20 4月, 2014 1 次提交
    • H
      Input: Add INPUT_PROP_TOPBUTTONPAD device property · f37c0134
      Hans de Goede 提交于
      On some newer laptops with a trackpoint the physical buttons for the
      trackpoint have been removed to allow for a larger touchpad. On these
      laptops the buttonpad has clearly marked areas on the top which are to be
      used as trackpad buttons.
      
      Users of the event device-node need to know about this, so that they can
      properly interpret BTN_LEFT events as being a left / right / middle click
      depending on where on the button pad the clicking finger is.
      
      This commits adds a INPUT_PROP_TOPBUTTONPAD device property which drivers
      for such buttonpads will use to signal to the user that this buttonpad not
      only has the normal bottom button area, but also a top button area.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      f37c0134
  19. 16 12月, 2013 1 次提交
  20. 06 12月, 2013 1 次提交
  21. 27 11月, 2013 1 次提交
  22. 08 9月, 2013 2 次提交
    • D
      Input: evdev - add EVIOCREVOKE ioctl · c7dc6573
      David Herrmann 提交于
      If we have multiple sessions on a system, we normally don't want
      background sessions to read input events. Otherwise, it could capture
      passwords and more entered by the user on the foreground session. This is
      a real world problem as the recent XMir development showed:
        http://mjg59.dreamwidth.org/27327.html
      
      We currently rely on sessions to release input devices when being
      deactivated. This relies on trust across sessions. But that's not given on
      usual systems. We therefore need a way to control which processes have
      access to input devices.
      
      With VTs the kernel simply routed them through the active /dev/ttyX. This
      is not possible with evdev devices, though. Moreover, we want to avoid
      routing input-devices through some dispatcher-daemon in userspace (which
      would add some latency).
      
      This patch introduces EVIOCREVOKE. If called on an evdev fd, this revokes
      device-access irrecoverably for that *single* open-file. Hence, once you
      call EVIOCREVOKE on any dup()ed fd, all fds for that open-file will be
      rather useless now (but still valid compared to close()!). This allows us
      to pass fds directly to session-processes from a trusted source. The
      source keeps a dup()ed fd and revokes access once the session-process is
      no longer active.
      Compared to the EVIOCMUTE proposal, we can avoid the CAP_SYS_ADMIN
      restriction now as there is no way to revive the fd again. Hence, a user
      is free to call EVIOCREVOKE themself to kill the fd.
      
      Additionally, this ioctl allows multi-layer access-control (again compared
      to EVIOCMUTE which was limited to one layer via CAP_SYS_ADMIN). A middle
      layer can simply request a new open-file from the layer above and pass it
      to the layer below. Now each layer can call EVIOCREVOKE on the fds to
      revoke access for all layers below, at the expense of one fd per layer.
      
      There's already ongoing experimental user-space work which demonstrates
      how it can be used:
        http://lists.freedesktop.org/archives/systemd-devel/2013-August/012897.htmlSigned-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      c7dc6573
    • L
      Revert "Input: introduce BTN/ABS bits for drums and guitars" · b04c99e3
      Linus Torvalds 提交于
      This reverts commits 61e00655, 73f8645d and 8e22ecb6:
        "Input: introduce BTN/ABS bits for drums and guitars"
        "HID: wiimote: add support for Guitar-Hero drums"
        "HID: wiimote: add support for Guitar-Hero guitars"
      
      The extra new ABS_xx values resulted in ABS_MAX no longer being a
      power-of-two, which broke the comparison logic.  It also caused the
      ioctl numbers to overflow into the next byte, causing problems for that.
      
      We'll try again for 3.13.
      Reported-by: NMarkus Trippelsdorf <markus@trippelsdorf.de>
      Reported-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Acked-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Benjamin Tissoires <benjamin.tissoires@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b04c99e3
  23. 04 9月, 2013 1 次提交
  24. 30 8月, 2013 1 次提交
  25. 27 6月, 2013 2 次提交
  26. 12 3月, 2013 1 次提交
  27. 15 11月, 2012 1 次提交
  28. 13 10月, 2012 1 次提交
  29. 09 10月, 2012 1 次提交
  30. 20 9月, 2012 2 次提交
  31. 05 7月, 2012 1 次提交
    • H
      Input: MT - Include win8 support · cab7faca
      Henrik Rydberg 提交于
      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: NChase Douglas <chase.douglas@canonical.com>
      Signed-off-by: NHenrik Rydberg <rydberg@euromail.se>
      cab7faca
  32. 12 6月, 2012 1 次提交
  33. 09 2月, 2012 1 次提交
  34. 03 2月, 2012 1 次提交
    • J
      Input: add infrastructure for selecting clockid for event time stamps · a80b83b7
      John Stultz 提交于
      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: NJohn Stultz <john.stultz@linaro.org>
      Reviewed-by: NDaniel Kurtz <djkurtz@google.com>
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      a80b83b7