08 Nov, 2015

1 commit

  • Pull HID updates from Jiri Kosina:
    "Highlights:

    - Intel Skylake Win8 precision touchpads support fixes/improvements
    from Mika Westerberg

    - Lenovo Yoga 2 quirk from Ritesh Raj Sarraf

    - potential uninitialized buffer access fix in HID core from Richard
    Purdie

    - Wacom Intuos and Wacom Cintiq 2 support improvements from Jason
    Gerecke and Ping Cheng

    - initiation of sysfs deprecation process for most of the roccat
    drivers, from the roccat support maintiner Stefan Achatz

    - quite a few device ID / quirk additions and small fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (30 commits)
    HID: logitech: Add support for G29
    HID: logitech: Simplify wheel detection scheme
    HID: wacom: Call 'wacom_query_tablet_data' only after 'hid_hw_start'
    HID: wacom: Fix ABS_MISC reporting for Cintiq Companion 2
    HID: wacom: Remove useless conditions from 'wacom_query_tablet_data'
    HID: wacom: fix Intuos wireless report id issue
    HID: fix some indenting issues
    HID: wacom: Expect 'touch_max' touches if HID_DG_CONTACTCOUNT not present
    HID: wacom: Tie cached HID_DG_CONTACTCOUNT indices to report ID
    HID: roccat: Fixed resubmit: Deprecating most Roccat sysfs attributes
    HID: wacom: Report full pressure range for Intuos, Cintiq 13HD Touch
    HID: wacom: Add support for Cintiq Companion 2
    HID: multitouch: Fetch feature reports on demand for Win8 devices
    HID: sensor-hub: Add quirk for Lenovo Yoga 2 with ITE Chips
    HID: usbhid: Fix for the WiiU adapter from Mayflash
    HID: corsair: boolify struct k90_led.removed
    HID: corsair: Add Corsair Vengeance K90 driver
    HID: hid-input: allow input_configured callback return errors
    HID: multitouch: Add suffix for HID_DG_TOUCHPAD
    HID: i2c-hid: Fill in physical device providing HID functionality
    ...

    Linus Torvalds
     

07 Nov, 2015

3 commits


06 Nov, 2015

2 commits

  • The input_configured callback was recently changed to return
    an 'int', but the newly added driver uses the old API:

    drivers/hid/hid-gfrm.c:151:22: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]

    This changes the driver like the other ones.

    Signed-off-by: Arnd Bergmann
    Fixes: 34fc1322e7aa ("HID: hid-gfrm: Google Fiber TV Box remote controls")
    Fixes: b2c68a2f1bab ("HID: hid-input: allow input_configured callback return errors")
    Acked-by: Petri Gynther
    Signed-off-by: Dmitry Torokhov

    Arnd Bergmann
     
  • When configuring input device via input_configured callback we may
    encounter errors (for example input_mt_init_slots() may fail). Instead
    of continuing with half-initialized input device let's allow driver
    indicate failures.

    Signed-off-by: Jaikumar Ganesh
    Signed-off-by: Arve Hjønnevåg
    Reviewed-by: Benjamin Tissoires
    Reviewed-by: David Herrmann
    Acked-by: Nikolai Kondrashov
    Acked-by: Andrew Duggan
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Jiri Kosina

    Dmitry Torokhov
     

05 Nov, 2015

1 commit

  • When connecting the Cintiq Companion 2 as an external tablet (i.e., using
    it in "hybrid" mode) it has been seen to cause the kernel of the machine
    it is connected to to Oops. The cause has been traced to us attempting to
    switch the tablet's mode prior to actually starting HID device (resulting
    in the eventual dereference of the uninitialized control URB).

    Commit 3b164a0 moved the mode switch from occuring post-start to occurring
    pre-start. The change was not seen to cause issues largely due to the fact
    that most devices mode switch with 'hid_hw_raw_request' (which is safe to
    call prior to start) rather than 'hid_hw_request'.

    Moving the call back to its original location resolves the issue, but
    causes some touch-only Bamboo tablets (e.g. 056a:00d0) to stop working.
    The affected tablets require us to perform a mode switch on their
    vestigial pen interface prior ignoring with -ENODEV, meaning that the
    code which is responsible for doing the ignoring has to move as well.

    Signed-off-by: Jason Gerecke
    Reviewed-by: Ping Cheng
    Signed-off-by: Jiri Kosina

    Jason Gerecke
     

03 Nov, 2015

3 commits

  • The pad handling code introduced for the Cintiq Companion 2 (f7acb55)
    looks at the wrong bytes in the report when deciding whether ABS_MISC
    should be sent. This does not cause any issues with the X driver now
    that the pen and pad have been split to separate devices, but is
    incorrect and has caused issues when backporting to distros with pre-
    3.17 kernels.

    Signed-off-by: Jason Gerecke
    Reviewed-by: Ping Cheng
    Signed-off-by: Jiri Kosina

    Jason Gerecke
     
  • When support for the Cintiq Companion Hybrid and Cintiq Companion 2 was
    added (36d3c51 and f7acb55), the 'wacom_query_tablet_data' function was
    updated to include references to CINTIQ_HYBRID and CINTIQ_COMPANION_2
    with the thought that they were necessary to switch the touch interface
    into the proper mode. This is unnecessary, however, since those types
    are only ever associated with the pen interface -- the touch interfaces
    are either CINTIQ_24HDT or HID_GENERIC. To avoid confusion in the future,
    we remove the unnecessary CINTIQ_HYBRID and CINTIQ_COMPANION_2 conditions.

    Signed-off-by: Jason Gerecke
    Reviewed-by: Ping Cheng
    Signed-off-by: Jiri Kosina

    Jason Gerecke
     
  • Intuos Pen in wireless mode does not have the same report id (2) as
    when it is in USB mode (17).

    This patch also moves WIRELESS next to REMOTE in type enum so we
    can group devices with similar features easily.

    Reported-by: Dale Brewe
    Tested-by: Dale Brewe
    Signed-off-by: Ping Cheng
    Signed-off-by: Jiri Kosina

    Ping Cheng
     

26 Oct, 2015

1 commit


21 Oct, 2015

5 commits

  • Some drivers indent some lines in a very weird manner. Fix that.

    Signed-off-by: Jiri Slaby
    Reviewed-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Jiri Slaby
     
  • When introduced in commit 1b5d514, the check 'if (hid_data->cc_index >= 0)'
    in 'wacom_wac_finger_pre_report' was intended to switch where the driver
    got the expected number of contacts from: HID_DG_CONTACTCOUNT if the usage
    was present, or 'touch_max' otherwise. Unfortunately, an oversight worthy
    of a brown paper bag (specifically, that 'cc_index' could never be negative)
    meant that the latter 'else' clause would never be entered.

    The patch prior to this one introduced a way for 'cc_index' to be negative,
    but only if HID_DG_CONTACTCOUNT is present in some report _other_ than the
    one being processed. To ensure the 'else' clause is also entered for devices
    which don't have HID_DG_CONTACTCOUNT on _any_ report, we add the additional
    constraint that 'cc_report' be non-zero (which is true only if the usage is
    present in some report).

    Cc: stable@vger.kernel.org
    Signed-off-by: Jason Gerecke
    Signed-off-by: Jiri Kosina

    Jason Gerecke
     
  • The cached indicies 'cc_index' and 'cc_value_index' introduced in 1b5d514
    are only valid for a single report ID. If a touchscreen has multiple
    reports with a HID_DG_CONTACTCOUNT usage, its possible that the values
    will not be correct for the report we're handling, resulting in an
    incorrect value for 'num_expected'. This has been observed with the Cintiq
    Companion 2.

    To address this, we store the ID of the report those indicies are valid
    for in a new 'cc_report' variable. Before using them to get the expected
    contact count, we first check if the ID of the report we're processing
    matches 'cc_report'. If it doesn't, we update the indicies to point to
    the HID_DG_CONTACTCOUNT usage of the current report (if it has one).

    Cc: stable@vger.kernel.org
    Signed-off-by: Jason Gerecke
    Signed-off-by: Jiri Kosina

    Jason Gerecke
     
  • The new Intuos tablets added in eda01da and the Cintiq 13HD Touch added
    in b4bf212 are capable of reporting 2048 levels of pressure. Although the
    kernel reports the correct range to userspace, an oversight has resulted
    in the driver ingoring the 11th pressure bit and only sending pressures
    of 0 through 1023.

    We could fix this issue by expanding the type check to include these
    devices, but it makes much more sense to just have the driver look at
    the device's maximum pressure when determining if it should read the
    11th bit.

    Signed-off-by: Jason Gerecke
    Reviewed-by: Ping Cheng
    Signed-off-by: Jiri Kosina

    Jason Gerecke
     
  • Adds support for the EMR (pen+pad) and touchscreen devices used by the
    Wacom Cintiq Companion 2. This applies both to using the device as a
    standalone system, as well as when operating in "Cintiq mode" (where
    the EMR/touchscreen are simply exposed as USB devices to the system
    its connected to).

    Signed-off-by: Jason Gerecke
    Signed-off-by: Clifford Jolly
    Signed-off-by: Jiri Kosina

    Jason Gerecke
     

12 Oct, 2015

1 commit

  • Some newer Intel Skylake based Dell laptops with Win8 precision touchpad
    fail when initial feature reports are fetched from it. Below is an example
    output with some additional debug included:

    i2c_hid i2c-DLL0704:01: Fetching the HID descriptor
    i2c_hid i2c-DLL0704:01: __i2c_hid_command: cmd=20 00
    i2c_hid i2c-DLL0704:01: HID Descriptor: 1e 00 00 01 99 02 21 00 24 ...
    ...
    i2c_hid i2c-DLL0704:01: i2c_hid_get_report
    i2c_hid i2c-DLL0704:01: __i2c_hid_command: cmd=22 00 38 02 23 00
    i2c_hid i2c-DLL0704:01: report (len=4): 04 00 08 05
    i2c_hid i2c-DLL0704:01: report id 13
    i2c_hid i2c-DLL0704:01: i2c_hid_get_report
    i2c_hid i2c-DLL0704:01: __i2c_hid_command: cmd=22 00 3d 02 23 00
    i2c_hid i2c-DLL0704:01: failed to retrieve report from device.
    i2c_hid i2c-DLL0704:01: report id 7
    i2c_hid i2c-DLL0704:01: i2c_hid_get_report
    i2c_hid i2c-DLL0704:01: __i2c_hid_command: cmd=22 00 37 02 23 00
    i2c_hid i2c-DLL0704:01: report (len=259): 03 01 07 fc 28 fe 84 40 ...
    i2c_hid i2c-DLL0704:01: report id 4
    i2c_hid i2c-DLL0704:01: i2c_hid_get_report
    i2c_hid i2c-DLL0704:01: __i2c_hid_command: cmd=22 00 34 02 23 00

    We manage to fetch few reports but then the touchpad dies:

    i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration
    i2c_hid i2c-DLL0704:01: failed to retrieve report from device.

    it eventually pulls the whole I2C bus low:

    i2c_designware i2c_designware.1: controller timed out
    i2c_hid i2c-DLL0704:01: failed to set a report to device.

    Fix this by preventing initial feature report retrieval for Win8 devices.
    Instead we fetch reports as needed in mt_feature_mapping(). This prevents
    fetching reports which might cause problems with the device in question.

    Suggested-by: Benjamin Tissoires
    Signed-off-by: Mika Westerberg
    Reviewed-by: Benjamin Tissoires
    Tested-by: Seth Forshee
    Signed-off-by: Jiri Kosina

    Mika Westerberg
     

06 Oct, 2015

1 commit

  • This patch is a follow-up to 47eeca8a48 (" HID: sensor-hub: Add in quirk
    for Lenovo Yogas with ITE")

    The Lenovo Yoga 2 13 seems to be sold in multiple variants with minor
    difference3s. IN my case, the USB ID for ITE chip is different than the
    Yoga 2 11 and Yoga 3 14.

    Without the quirk, no data is received from the accelerometer. I have
    verified the patch, testing this on 4.3-rc4 (and 4.2 stable). With this
    patch, proper orientation data is received.

    rrs@learner:~/Community/UpstreamSources/linux-upstream_GIT (stable-42)$
    monitor-sensor
    ** Message: Accelerometer orientation changed: bottom-up
    ** Message: Light changed: 0.000000 (lux)
    ±** Message: Accelerometer orientation changed: left-up
    ** Message: Accelerometer orientation changed: bottom-up
    ** Message: Accelerometer orientation changed: left-up
    ** Message: Accelerometer orientation changed: normal
    ** Message: Light changed: 29.999999 (lux)

    monitor-sensor can be found in the iio-sensor-proxy tool.

    Signed-off-by: Ritesh Raj Sarraf
    Acked-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Ritesh Raj Sarraf
     

05 Oct, 2015

1 commit

  • The WiiU adapter from Mayflash (see
    http://www.mayflash.com/Products/NINTENDOWiiU/W009.html) is not
    working correctly.

    The "XInput" mode works fine, the controller is recognized as a xbox
    controller. But it is only possible to connect one controller with this method.

    In "DInput" mode the device is recognized as some kind of mouse input but no
    joystick is created. This commit will change this behavior with
    HID_QUIRK_MULTI_INPUT to split the device into 4 input devices so that it will
    also create joysticks in /dev/input/js*.

    Signed-off-by: Oliver Schmitt
    Reviewed-by: Felipe Balbi
    Signed-off-by: Jiri Kosina

    Oliver Schmitt
     

01 Oct, 2015

2 commits


30 Sep, 2015

1 commit

  • When configuring input device via input_configured callback we may
    encounter errors (for example input_mt_init_slots() may fail). Instead
    of continuing with half-initialized input device let's allow driver
    indicate failures.

    Signed-off-by: Jaikumar Ganesh
    Signed-off-by: Arve Hjønnevåg
    Reviewed-by: Benjamin Tissoires
    Reviewed-by: David Herrmann
    Acked-by: Nikolai Kondrashov
    Acked-by: Andrew Duggan
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Jiri Kosina

    Dmitry Torokhov
     

29 Sep, 2015

2 commits


24 Sep, 2015

2 commits


23 Sep, 2015

3 commits

  • hid_connect adds various strings to the buffer but they're all
    conditional. You can find circumstances where nothing would be written
    to it but the kernel will still print the supposedly empty buffer with
    printk. This leads to corruption on the console/in the logs.

    Ensure buf is initialized to an empty string.

    Signed-off-by: Richard Purdie
    [dvhart: Initialize string to "" rather than assign buf[0] = NULL;]
    Cc: Jiri Kosina
    Cc: linux-input@vger.kernel.org
    Cc: stable@vger.kernel.org
    Signed-off-by: Darren Hart
    Signed-off-by: Jiri Kosina

    Richard Purdie
     
  • Just to prettify the log message. Otherwise it would be .

    Signed-off-by: Daniel Martin
    Reviewed-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Daniel Martin
     
  • Adds support for Microsoft Type Cover 3 with 0x07e2 product ID.

    Signed-off-by: Donavan Lance
    Signed-off-by: Jiri Kosina

    Donavan Lance
     

05 Sep, 2015

1 commit

  • Pull input subsystem updates from Dmitry Torokhov:
    "Drivers, drivers, drivers... No interesting input core changes this
    time"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (74 commits)
    Input: elan_i2c - use iap_version to get firmware information
    Input: max8997_haptic - fix module alias
    Input: elan_i2c - fix typos for validpage_count
    Input: psmouse - add small delay for IBM trackpoint pass-through mode
    Input: synaptics - fix handling of disabling gesture mode
    Input: elan_i2c - enable ELAN0100 acpi panels
    Input: gpio-keys - report error when disabling unsupported key
    Input: sur40 - fix error return code
    Input: sentelic - silence some underflow warnings
    Input: zhenhua - switch to using bitrev8()
    Input: cros_ec_keyb - replace KEYBOARD_CROS_EC dependency
    Input: cap11xx - add LED support
    Input: elants_i2c - fix for devm_gpiod_get API change
    Input: elan_i2c - enable asynchronous probing
    Input: elants_i2c - enable asynchronous probing
    Input: elants_i2c - wire up regulator support
    Input: do not emit unneeded EV_SYN when suspending
    Input: elants_i2c - disable idle mode before updating firmware
    MAINTAINERS: Add maintainer for atmel_mxt_ts
    Input: atmel_mxt_ts - remove warning on zero T44 count
    ...

    Linus Torvalds
     

04 Sep, 2015

6 commits

  • Fixed HID descriptor for DragonRise Joystick. Replaced default descriptor
    which doubles Z axis and causes mixing values of X and Z axes.

    Signed-off-by: Maciej Zuk
    Signed-off-by: Jiri Kosina

    Maciej Zuk
     
  • The Logitech K400 keyboard has an embedded touchpad which is seen as a
    mouse from the OS point of view. There is a hardware shortcut to disable
    tap-to-click but the setting is not remembered accross reset, annoying
    some users.

    We can toggle this feature from the host by using the feature 0x6010:
    Touchpad FW items

    Reported-by: BALATON Zoltan
    Tested-by: BALATON Zoltan
    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Benjamin Tissoires
     
  • HIDPP_QUIRK_DELAYED_INIT means two things currently:
    - we want to delay the initialization process
    - we do not want hid to create an input device based on the report
    descriptor.

    This should actually be 2 different quirks so we can have special connect
    events while still having HID creating the input for us.

    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Benjamin Tissoires
     
  • There is an error in the report descriptor of the Thinkpad Helix 2 where
    logical minimum value (557376) is greater than logical maximum (491200)
    for all of the magnetic flux axis data fields. This error results in a
    report descriptor parsing failure that causes the sensors attached to the
    hub not to be detected.

    dmesg excerpt:
    [ 19.866905] drivers/hid/hid-core.c: logical range invalid 0x88140 0x77ec0
    [ 19.866914] hid-sensor-hub 0018:2047:0855.0007: item 0 1 0 8 parsing failed
    [ 19.866926] hid-sensor-hub 0018:2047:0855.0007: parse failed
    [ 19.866933] hid-sensor-hub: probe of 0018:2047:0855.0007 failed with error -22

    Add a report fixup to change magnetic flux logical minimums to -557376
    for the parsing to succeed and the sensors to get detected.
    After applying the fix the sensors get detected, with corresponding drivers
    (hid-accel-3d,hid-gyro-3d,etc) loaded, and its possible to read their values.

    Signed-off-by: Fernando D S Lima
    Reviewed-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Fernando D S Lima
     
  • This patch enables the Saitek HID quirk for the mode button of the Mad Catz
    R.A.T.5 gaming mouse by adding the same quirk that's been neeeded for
    preivous versions.

    [jikos@kernel.org: update changelog a little bit]
    Signed-off-by: Harald Brinkmann
    Signed-off-by: Jiri Kosina

    Harald Brinkmann
     
  • Prepare first round of input updates for 4.3 merge window.

    Dmitry Torokhov
     

01 Sep, 2015

4 commits