1. 29 8月, 2015 3 次提交
  2. 18 8月, 2015 1 次提交
  3. 11 8月, 2015 1 次提交
    • J
      HID: wacom: Simplify 'wacom_pl_irq' · 025bcc15
      Jason Gerecke 提交于
      Unlike other IRQ functions, 'wacom_pl_irq' uses the second element of
      the 'tool' array to store information about its single pen. This makes
      the function more difficult to understand (since it doesn't follow the
      general pattern of other IRQ functions) and prevents the possibility of
      refactoring how pen state is stored.
      
      This patch rewrites 'wacom_pl_irq' to follow the usual IRQ conventions,
      including storing tool type in 'tool[0]' and implicitly tracking prox
      with the 'id[0]' variable.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      025bcc15
  4. 04 8月, 2015 2 次提交
  5. 23 7月, 2015 3 次提交
  6. 13 7月, 2015 1 次提交
  7. 18 6月, 2015 4 次提交
    • J
      HID: wacom: Introduce new 'touch_input' device · 2a6cdbdd
      Jason Gerecke 提交于
      Instead of having a single 'input_dev' device that will take either pen
      or touch data depending on the type of the device, create seperate devices
      devices for each. By splitting things like this, we can support devices
      (e.g. the I2C "AES" sensors in some newer tablet PCs) that send both pen
      and touch reports from a single endpoint.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      2a6cdbdd
    • J
      HID: wacom: Split apart 'wacom_setup_pentouch_input_capabilites' · 2636a3f2
      Jason Gerecke 提交于
      This splits the 'wacom_setup_pentouch_input_capabilites' function into
      pieces dedicated to doing setup for just the pen interface and just
      the touch interface. This makes it easier to focus on the relevant
      piece when making changes.
      
      This patch introduces no functional changes.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      2636a3f2
    • J
      HID: wacom: Introduce a new WACOM_DEVICETYPE_PAD device_type · 862cf553
      Jason Gerecke 提交于
      Historically, both the touch and pad tools would have shared the
      'BTN_TOOL_FINGER' type. Any time you needed to distinguish the two, you
      had to use some other bit of knowledge (e.g. that the pad was on the same
      interface as the pen, and thus 'touch_max' would be zero).
      
      To make these checks more readable, we introduce WACOM_DEVICETYPE_PAD.
      Although we still have to rely on other bits of knowledge to set this
      bit on the right interface (since it cannot be detected from the HID
      descriptor), it can be done just once inside 'wacom_setup_device_quirks'.
      
      This patch introduces no functional changes.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      862cf553
    • J
      HID: wacom: Treat features->device_type values as flags · aa86b18c
      Jason Gerecke 提交于
      The USB devices that this driver has historically supported segregate the
      pen and touch portions of the tablet. Oftentimes the segregation would be
      done at the interface level, though on occasion (e.g. Cintiq 24HDT) the
      tablet would combine two totally independent USB devices behind an internal
      USB hub. Because pen and touch never shared the same interface, it made
      sense for the 'device_type' to store a single value: "pen" or "touch".
      
      Recently, however, some I2C devices have been created which combine the
      two. A first step to accomodating this is to expand 'device_type' so that
      it can represent two (or potentially more) types simultaneously. To do
      this, we treat it as a bitfield and set/check individual bits rather
      than using the '=' and '==' operators.
      
      This should not result in any functional change since no supported devices
      (that I'm aware of, at least) have HID descriptors that indicate both
      pen and touch reports on a single interface.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      aa86b18c
  8. 20 5月, 2015 1 次提交
  9. 04 5月, 2015 1 次提交
    • J
      HID: wacom: Discover device_type from HID descriptor for all devices · 042628ab
      Jason Gerecke 提交于
      Currently, we assume a device_type of BTN_TOOL_PEN before scanning the
      HID descriptor and then change the device_type if what we discover
      proves that assumption wrong. This way of doing things makes it more
      difficult to figure out if a device (particularly a HID_GENERIC device)
      actually does tablet/touch input or is something completley different.
      
      This patch leaves device_type at its initial value of 0 and then calls
      'wacom_parse_hid' for every device (not just those that have touch).
      As we map the usages, we can set the device_type as before. After we're
      finished, we can then check if the value is still zero and do whatever
      is most appropriate.
      
      Detecting the pen can be a little tricky on most Wacom devices because
      the descriptors describe opaque blobs. Fortunately, older Wacom tablets
      have the HID_DG_DIGITIZER usage on the pen's application collection and
      newer tablets seem to have a similar vendor-defined usage that we can
      trigger on.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Reviewed-by: NPing Cheng <pingc@wacom.com>
      Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      042628ab
  10. 23 4月, 2015 3 次提交
  11. 02 4月, 2015 4 次提交
  12. 18 3月, 2015 1 次提交
  13. 17 3月, 2015 1 次提交
    • B
      HID: wacom: ask for a in-prox report when it was missed · 5fcad167
      Benjamin Tissoires 提交于
      If noone listens to the input device when a tool comes in proximity,
      the tablet does not send the in-prox event when a client becomes available.
      That means that no events will be sent until the tool is taken out of
      proximity.
      
      In this situation, ask for the report WACOM_REPORT_INTUOSREAD which will
      read the corresponding feature and generate an in-prox event.
      To make some generation of hardware working, we need to unset the
      quirk NO_GET set by hid-core because the interfaces are seen as "boot
      mouse".
      
      We don't schedule this read in a worker while we are in an IO interrupt.
      We know that usbhid will do it asynchronously. If this is triggered by
      uhid, then this is obviously a client side bug :)
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: NJason Gerecke <killertofu@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      5fcad167
  14. 12 3月, 2015 1 次提交
    • J
      HID: wacom: Add battery presence indicator to wireless tablets · 71fa641e
      Jason Gerecke 提交于
      Declare the POWER_SUPPLY_PROP_PRESENT property to provide userspace
      with a way to determine if the battery on a wireless tablet is plugged
      in. Although current wireless tablets do not explicitly report this
      information, it can be inferred from other state information. In
      particular, a battery is assumed to be present if any of the following
      are true: a non-zero battery level reported, the battery is reported as
      charging, or the tablet is operating wirelessly.
      
      Note: The last condition above may not strictly hold for the Graphire
      Wireless (it charges from a DC barrel jack instead of a USB port), but I
      do not know what is reported in the no-battery condition.
      Signed-off-by: NJason Gerecke <killertofu@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      71fa641e
  15. 11 3月, 2015 5 次提交
  16. 03 3月, 2015 2 次提交
  17. 27 2月, 2015 1 次提交
    • B
      HID: wacom: add full support of the Wacom Bamboo PAD · 8c97a765
      Benjamin Tissoires 提交于
      The stylus of this device works just fine out of the box.
      The touch is seen by default as a mouse with relative events and some
      gestures.
      The wireless and the wired version have slightly different firmwares, but
      the debug mode 2 on the feature 2 is common to the 2 devices. In this mode,
      all the reports are emitted through the debug interface (pen, raw touch
      and mouse emulation), so we have to re-route manually the events.
      
      We keep the Pen interface as a HID_GENERIC one because it works, and only
      parse the raw touches while discarding the mouse emulation & gestures.
      
      Switching the default in raw mode allows us to have a consistent user
      experience accross all the multitouch touchpads (and enable the touch part
      of the devices).
      
      Note that the buttons of this devices are reported through the touch
      interface. There is no 'Pad' interface. It seemed more natural to have
      the BTN_LEFT and BTN_RIGHT reported with the touch because they are
      placed under the touch interface and it looks like they belong to the
      touch part.
      Tested-by: NJosep Sanchez Ferreres <josep.sanchez.ferreres@est.fib.upc.edu>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: NPing Cheng <pingc@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      8c97a765
  18. 24 2月, 2015 1 次提交
  19. 19 2月, 2015 1 次提交
  20. 12 2月, 2015 1 次提交
  21. 29 1月, 2015 2 次提交