1. 26 11月, 2012 1 次提交
  2. 31 10月, 2012 1 次提交
    • I
      HID: fix incorrect handling of devices with high button count · f8e86d05
      Ingo Ruhnke 提交于
      Button names for USB gamepads are currently assigned incorrectly, as the evdev
      code assigned to buttons is "BTN_GAMEPAD + code", which on devices with more
      then 16 buttons bleeds over into button names reserved for graphic tablets
      (BTN_TOOL_PEN, etc.). This causes problems further down the line as the device
      are now no longer detected as joystick. This patch fixes that by assigning
      buttons outside the range to BTN_TRIGGER_HAPPY (as is already the case for USB
      joysticks).
      
      Furthermore this patch corrects the assignment to BTN_TRIGGER_HAPPY, as
      currently the first button over 16 is assigned to BTN_TRIGGER_HAPPY17 (i.e.
      BTN_TRIGGER_HAPPY+0x10) not BTN_TRIGGER_HAPPY.
      Signed-off-by: NIngo Ruhnke <grumbel@gmail.com>
      Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      f8e86d05
  3. 20 9月, 2012 1 次提交
  4. 09 7月, 2012 1 次提交
  5. 04 7月, 2012 1 次提交
  6. 01 5月, 2012 1 次提交
    • H
      HID: hid-multitouch: Switch to device groups · 4fa3a583
      Henrik Rydberg 提交于
      Switch the driver over to device group handling.  By adding the
      HID_GROUP_MULTITOUCH group to hid-core, hid-generic will no longer
      match multitouch devices.  By adding the HID_GROUP_MULTITOUCH entry to
      the device list, hid-multitouch will match all unknown multitouch
      devices, and udev will automatically load the module.
      
      Since HID_QUIRK_MULTITOUCH never gets set, the special quirks handling
      can be removed.  Since all HID MT devices have HID_DG_CONTACTID, they
      can be removed from the hid_have_special_driver list.
      
      With this patch, the unknown device ids are no longer NULL, so the code
      is modified to check for the generic entry instead.
      Signed-off-by: NHenrik Rydberg <rydberg@euromail.se>
      Acked-by: NBenjamin Tissoires <benjamin.tissoires@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      4fa3a583
  7. 28 3月, 2012 1 次提交
  8. 05 3月, 2012 1 次提交
    • N
      HID: hid-input: allow array fields out of range · 883e0e36
      Nikolai Kondrashov 提交于
      Allow array field values out of range as per HID 1.11 specification,
      section 6.2.25:
      
      	Rather than returning a single bit for each button in the group, an
      	array returns an index in each field that corresponds to the pressed
      	button (like keyboard scan codes). An out-of range value in and array
      	field is considered no controls asserted.
      
      Apparently, "and" above is a typo and should be "an".
      
      This fixes at least Waltop tablet pen clicks - otherwise BTN_TOUCH is never
      released.
      
      The relevant part of Waltop tablet report descriptors is this:
      
      	0x09, 0x42,         /*          Usage (Tip Switch),         */
      	0x09, 0x44,         /*          Usage (Barrel Switch),      */
      	0x09, 0x46,         /*          Usage (Tablet Pick),        */
      	0x15, 0x01,         /*          Logical Minimum (1),        */
      	0x25, 0x03,         /*          Logical Maximum (3),        */
      	0x75, 0x04,         /*          Report Size (4),            */
      	0x95, 0x01,         /*          Report Count (1),           */
      	0x80,               /*          Input,                      */
      
      This is a regression fix for commit b4b583d4 ("HID: be more strict when
      ignoring out-of-range fields").
      Signed-off-by: NNikolai Kondrashov <spbnick@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      883e0e36
  9. 04 2月, 2012 1 次提交
  10. 08 1月, 2012 8 次提交
  11. 21 12月, 2011 1 次提交
  12. 30 11月, 2011 1 次提交
  13. 28 11月, 2011 1 次提交
    • J
      HID: hid-input: add support for HID devices reporting Battery Strength · 4f5ca836
      Jeremy Fitzhardinge 提交于
      Some HID devices, such as my Bluetooth mouse, report their battery
      strength as an event.  Rather than passing it through as a strange
      absolute input event, this patch registers it with the power_supply
      subsystem as a battery, so that the device's Battery Strength can be
      reported to usermode.
      
      The battery appears in sysfs names
      /sys/class/power_supply/hid-<UNIQ>-battery, and it is a child of the
      battery-containing device, so it should be clear what it's the battery of.
      
      Unfortunately on my current Fedora 16 system, while the battery does
      appear in the UI, it is listed as a Laptop Battery with 0% charge (since
      it ignores the "capacity" property of the battery and instead computes
      it from the "energy*" fields, which we can't supply given the limited
      information contained within the HID Report).
      
      Still, this patch is the first step.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      4f5ca836
  14. 16 11月, 2011 2 次提交
  15. 26 9月, 2011 1 次提交
  16. 18 5月, 2011 1 次提交
    • J
      HID: assorted usage updates from hut 1.12 · 437f3b19
      Jarod Wilson 提交于
      I've got a Tivo Slide bluetooth remote/dongle, which uses a fair number
      of hid usages that aren't currently mapped in hid-input.c. I'd initially
      written additions to hid-input.c with just this device in mind,
      including some bits that were specific to the device. This go around,
      I'm looking at adding/correcting as many generic HID usages from the HID
      Usage Tables, version 1.12, as I can -- which also serves to enable all
      but four of the buttons on the Tivo Slide remote[*].
      
      Outside of fixing the obviously incorrect mapping of 0xc 0x45 from
      KEY_RADIO to KEY_RIGHT, and making use of the new KEY_IMAGES (just added
      in 2.6.39-rc4) for AL Image Browser instead of KEY_MEDIA, these are
      purely additions, and thus should have no negative impact on any already
      functional HID devices. Most of the added mappings seemed to be
      perfectly logical to me, but there were a few that were mapped on more
      of an "I think this makes the most sense" basis.
      
      [*] I'll handle the last four tivo buttons via an hid-tivo.c follow-up.
      
      CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      CC: Jiri Kosina <jkosina@suse.cz>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      437f3b19
  17. 02 3月, 2011 1 次提交
  18. 16 2月, 2011 1 次提交
  19. 01 2月, 2011 1 次提交
  20. 12 1月, 2011 1 次提交
  21. 14 12月, 2010 1 次提交
  22. 10 12月, 2010 1 次提交
    • J
      HID: Add and use hid_<level>: dev_<level> equivalents · 4291ee30
      Joe Perches 提交于
      Neaten current uses of dev_<level> by adding and using
      hid specific hid_<level> macros.
      
      Convert existing uses of dev_<level> uses to hid_<level>.
      Convert hid-pidff printk uses to hid_<level>.
      
      Remove err_hid and use hid_err instead.
      
      Add missing newlines to logging messages where necessary.
      Coalesce format strings.
      
      Add and use pr_fmt(fmt) KBUILD_MODNAME ": " fmt
      
      Other miscellaneous changes:
      
      Add const struct hid_device * argument to hid-core functions
      extract() and implement() so hid_<level> can be used by them.
      Fix bad indentation in hid-core hid_input_field function
      that calls extract() function above.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      4291ee30
  23. 08 12月, 2010 1 次提交
  24. 02 12月, 2010 1 次提交
  25. 03 11月, 2010 1 次提交
  26. 15 10月, 2010 1 次提交
  27. 21 9月, 2010 1 次提交
  28. 16 9月, 2010 1 次提交
  29. 10 9月, 2010 1 次提交
  30. 10 8月, 2010 1 次提交
    • N
      HID: Add Tablet Pick -> BTN_STYLUS2 mapping · 50b63697
      Nikolai Kondrashov 提交于
      Many tablet input drivers use BTN_STYLUS2 code to report a second
      tablet stylus button. Yet, the generic HID input driver doesn't map it.
      Apparently, because there is no corresponding usage in the HID Usage Tables.
      
      This patch selects a compromise usage - "Tablet Pick" (0x46) to be mapped to
      BTN_STYLUS2. Some tablets use "Eraser" usage, but mapping it to a button
      wouldn't be entirely correct, because the specification says it may be "a
      pressure quantity".
      Signed-off-by: NNikolai Kondrashov <spbnick@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      50b63697
  31. 19 7月, 2010 1 次提交
  32. 14 7月, 2010 1 次提交