1. 27 7月, 2017 1 次提交
    • J
      HID: wacom: Improve generic name generation · 09dc28ac
      Jason Gerecke 提交于
      The 'wacom_update_name' function is responsible for producing names for
      the input device nodes based on the hardware device name. Commit f2209d4a
      added the ability to strip off prefixes like "Wacom Co.,Ltd." where the
      prefix was immediately (and redundantly) followed by "Wacom". The
      2nd-generation Intuos Pro 2 has such a prefix, but with a small error
      (the period and comma are swapped) that prevents the existing code from
      matching it. We're loath to extend the number of cases out endlessly and
      so instead try to be smarter about name generation.
      
      We observe that the cause of the redundant prefixes is HID combining the
      manufacturer and product strings of USB devices together. By using the
      original product name (with "Wacom" prefixed, if it does not already
      exist in the string) we can bypass the gyrations to find and remove
      redundant prefixes. Other devices either don't have a manufacturer string
      that needs to be removed (Bluetooth, uhid) or should have their name
      generated from scratch (I2C).
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Acked-By: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      09dc28ac
  2. 20 7月, 2017 1 次提交
  3. 06 5月, 2017 1 次提交
    • J
      HID: wacom: Add ability to provide explicit battery status info · 16e45989
      Jason Gerecke 提交于
      At the moment, our driver relies on 'wacom_battery_get_property()' to
      determine the most likely battery state (e.g charging, discharging, or
      full) based on the information available. It is not always possible
      for the function to properly determine this, however. For instance,
      whenever an AES pen leaves proximity the battery state becomes
      indeterminite. This commit adds the ability to provide it with explict
      state information if desired. Whenever explicit state is not required
      (the majority of circumstances), WACOM_POWER_SUPPLY_STATUS_AUTO can
      be used in its place.
      
      Three uses of explicit battery status are added: two wireless disconnect
      paths and the AES case mentioned above.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Reviewed-by: NPing Cheng <ping.cheng@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      16e45989
  4. 30 3月, 2017 2 次提交
  5. 21 3月, 2017 1 次提交
  6. 06 3月, 2017 2 次提交
  7. 27 1月, 2017 5 次提交
  8. 23 1月, 2017 3 次提交
  9. 19 1月, 2017 1 次提交
    • J
      HID: wacom: Fix sibling detection regression · a9ce7856
      Jason Gerecke 提交于
      Commit 345857bb ("HID: wacom: generic: Add support for sensor offsets") included
      a change to the operation and location of the call to 'wacom_add_shared_data'
      in 'wacom_parse_and_register'. The modifications included moving it higher up
      so that it would occur before the call to 'wacom_retrieve_hid_descriptor'. This
      was done to prevent a crash that would have occured when the report containing
      tablet offsets was fed into the driver with 'wacom_hid_report_raw_event'
      (specifically: the various 'wacom_wac_*_report' functions were written with the
      assumption that they would only be called once tablet setup had completed;
      'wacom_wac_pen_report' in particular dereferences 'shared' which wasn't yet
      allocated).
      
      Moving the call to 'wacom_add_shared_data' effectively prevented the crash but
      also broke the sibiling detection code which assumes that the HID descriptor
      has been read and the various device_type flags set.
      
      To fix this situation, we restore the original 'wacom_add_shared_data'
      operation and location and instead implement an alternative change that can
      also prevent the crash. Specifically, we notice that the report functions
      mentioned above expect to be called only for input reports.  By adding a check,
      we can prevent feature reports (such as the offset report) from
      causing trouble.
      
      Fixes: 345857bb ("HID: wacom: generic: Add support for sensor offsets")
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Tested-by: NPing Cheng <pingc@wacom.com>
      Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      a9ce7856
  10. 06 1月, 2017 1 次提交
  11. 20 10月, 2016 5 次提交
  12. 10 8月, 2016 1 次提交
  13. 05 8月, 2016 16 次提交