1. 09 Feb, 2015 1 commit
  2. 29 Jan, 2015 3 commits
  3. 26 Jan, 2015 2 commits
  4. 23 Jan, 2015 1 commit
  5. 21 Jan, 2015 1 commit
  6. 20 Jan, 2015 1 commit
  7. 19 Jan, 2015 2 commits
  8. 12 Jan, 2015 5 commits
  9. 09 Jan, 2015 2 commits
  10. 07 Jan, 2015 1 commit
  11. 06 Jan, 2015 6 commits
    • Jiri Kosina's avatar
      HID: fixup the conflicting keyboard mappings quirk · 8e7b3410
      Jiri Kosina authored
      The ignore check that got added in 6ce901eb ("HID: input: fix confusion
      on conflicting mappings") needs to properly check for VARIABLE reports
      as well (ARRAY reports should be ignored), otherwise legitimate keyboards
      might break.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 6ce901eb ("HID: input: fix confusion on conflicting mappings")
      Reported-by: default avatarFredrik Hallenberg <megahallon@gmail.com>
      Reported-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      8e7b3410
    • Ross Skaliotis's avatar
      HID: apple: fix battery support for the 2009 ANSI wireless keyboard · cbd366be
      Ross Skaliotis authored
      Enabled quirks necessary for correct battery capacity reporting. Cleaned up
      surrounding style.
      Signed-off-by: default avatarRoss Skaliotis <rskaliotis@gmail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      cbd366be
    • Geert Uytterhoeven's avatar
      79bc33bd
    • David Herrmann's avatar
      HID: input: fix confusion on conflicting mappings · 6ce901eb
      David Herrmann authored
      On an PC-101/103/104 keyboard (American layout) the 'Enter' key and its
      neighbours look like this:
      
                 +---+ +---+ +-------+
                 | 1 | | 2 | |   5   |
                 +---+ +---+ +-------+
                   +---+ +-----------+
                   | 3 | |     4     |
                   +---+ +-----------+
      
      On a PC-102/105 keyboard (European layout) it looks like this:
      
                 +---+ +---+ +-------+
                 | 1 | | 2 | |       |
                 +---+ +---+ +-+  4  |
                   +---+ +---+ |     |
                   | 3 | | 5 | |     |
                   +---+ +---+ +-----+
      
      (Note that the number of keys is the same, but key '5' is moved down and
       the shape of key '4' is changed. Keys '1' to '3' are exactly the same.)
      
      The keys 1-4 report the same scan-code in HID in both layouts, even though
      the keysym they produce is usually different depending on the XKB-keymap
      used by user-space.
      However, key '5' (US 'backslash'/'pipe') reports 0x31 for the upper layout
      and 0x32 for the lower layout, as defined by the HID spec. This is highly
      confusing as the linux-input API uses a single keycode for both.
      
      So far, this was never a problem as there never has been a keyboard with
      both of those keys present at the same time. It would have to look
      something like this:
      
                 +---+ +---+ +-------+
                 | 1 | | 2 | |  x31  |
                 +---+ +---+ +-------+
                   +---+ +---+ +-----+
                   | 3 | |x32| |  4  |
                   +---+ +---+ +-----+
      
      HID can represent such a keyboard, but the linux-input API cannot.
      Furthermore, any user-space mapping would be confused by this and,
      luckily, no-one ever produced such hardware.
      
      Now, the HID input layer fixed this mess by mapping both 0x31 and 0x32 to
      the same keycode (KEY_BACKSLASH==0x2b). As only one of both physical keys
      is present on a hardware, this works just fine.
      
      Lets introduce hardware-vendors into this:
      ------------------------------------------
      
      Unfortunately, it seems way to expensive to produce a different device for
      American and European layouts. Therefore, hardware-vendors put both keys,
      (0x31 and 0x32) on the same keyboard, but only one of them is hooked up
      to the physical button, the other one is 'dead'.
      This means, they can use the same hardware, with a different button-layout
      and automatically produce the correct HID events for American *and*
      European layouts. This is unproblematic for normal keyboards, as the
      'dead' key will never report any KEY-DOWN events. But RollOver keyboards
      send the whole matrix on each key-event, allowing n-key roll-over mode.
      This means, we get a 0x31 and 0x32 event on each key-press. One of them
      will always be 0, the other reports the real state. As we map both to the
      same keycode, we will get spurious key-events, even though the real
      key-state never changed.
      
      The easiest way would be to blacklist 'dead' keys and never handle those.
      We could simply read the 'country' tag of USB devices and blacklist either
      key according to the layout. But... hardware vendors... want the same
      device for all countries and thus many of them set 'country' to 0 for all
      devices. Meh..
      
      So we have to deal with this properly. As we cannot know which of the keys
      is 'dead', we either need a heuristic and track those keys, or we simply
      make use of our value-tracking for HID fields. We simply ignore HID events
      for absolute data if the data didn't change. As HID tracks events on the
      HID level, we haven't done the keycode translation, yet. Therefore, the
      'dead' key is tracked independently of the real key, therefore, any events
      on it will be ignored.
      
      This patch simply discards any HID events for absolute data if it didn't
      change compared to the last report. We need to ignore relative and
      buffered-byte reports for obvious reasons. But those cannot be affected by
      this bug, so we're fine.
      
      Preferably, we'd do this filtering on the HID-core level. But this might
      break a lot of custom drivers, if they do not follow the HID specs.
      Therefore, we do this late in hid-input just before we inject it into the
      input layer (which does the exact same filtering, but on the keycode
      level).
      
      If this turns out to break some devices, we might have to limit filtering
      to EV_KEY events. But lets try to do the Right Thing first, and properly
      filter any absolute data that didn't change.
      
      This patch is tagged for 'stable' as it fixes a lot of n-key RollOver
      hardware. We might wanna wait with backporting for a while, before we know
      it doesn't break anything else, though.
      
      Cc: <stable@vger.kernel.org>
      Reported-by: default avatarAdam Goode <adam@spicenitz.org>
      Reported-by: default avatarFredrik Hallenberg <megahallon@gmail.com>
      Tested-by: default avatarFredrik Hallenberg <megahallon@gmail.com>
      Signed-off-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      6ce901eb
    • Benjamin Tissoires's avatar
      HID: wacom: add support of the Pen of the Bamboo Pad · 61e9e7e4
      Benjamin Tissoires authored
      Bamboo Pads are using the generic processing but their report descriptors
      differ from the ISDv* line. The pen fields are marked with the .physical
      as Digitizer_Pen, which makes also sense.
      
      Add this field to the checks and enable for free Bamboo Pads.
      Reported-by: default avatarJosep Sanchez Ferreres <josep.sanchez.ferreres@est.fib.upc.edu>
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Reviewed-by: default avatarJason Gerecke <killertofu@gmail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      61e9e7e4
    • Benjamin Tissoires's avatar
      HID: wacom: use WACOM_*_FIELD macros in wacom_usage_mapping() · d97a5522
      Benjamin Tissoires authored
      We introduced nice macros in wacom_wac.c to check whether a field is
      a pen or a touch one.
      
      wacom_usage_mapping() still uses it's own tests, which are not in sync with
      the wacom_wac tests (.application is not checked).
      
      That means that some legitimate fields might be filtered out from the
      usage mapping, and thus will not be used properly while receiving the
      events.
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      d97a5522
  12. 29 Dec, 2014 1 commit
  13. 22 Dec, 2014 3 commits
  14. 19 Dec, 2014 3 commits
  15. 17 Dec, 2014 8 commits