summaryrefslogtreecommitdiffstats
path: root/drivers/hid
Commit message (Collapse)AuthorAgeFilesLines
...
* | HID: wacom: Add outbounding area for DTU1141Ping Cheng2015-11-131-1/+2
|/ | | | | | | | DTU1141 has an extra 1 mm tablet active outbounding area on each side of the display, same as those recently released DTUs. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge branch 'for-linus' of ↵Linus Torvalds2015-11-0721-128/+1279
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 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 ...
| *---------------. Merge branches 'for-4.3/upstream-fixes', 'for-4.4/corsair', ↵Jiri Kosina2015-11-0630-152/+1294
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'for-4.4/dragonrise', 'for-4.4/i2c-hid', 'for-4.4/logitech', 'for-4.4/microsoft', 'for-4.4/multitouch', 'for-4.4/roccat-sysfs-deprecation', 'for-4.4/upstream' and 'for-4.4/wacom' into for-linus
| | | | | | | | | | * HID: wacom: Call 'wacom_query_tablet_data' only after 'hid_hw_start'Jason Gerecke2015-11-051-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jason.gerecke@wacom.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | | * HID: wacom: Fix ABS_MISC reporting for Cintiq Companion 2Jason Gerecke2015-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jason.gerecke@wacom.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | | * HID: wacom: Remove useless conditions from 'wacom_query_tablet_data'Jason Gerecke2015-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jason.gerecke@wacom.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | | * HID: wacom: fix Intuos wireless report id issuePing Cheng2015-11-023-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dlbrewe@hotmail.com> Tested-by: Dale Brewe <dlbrewe@hotmail.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | | * HID: wacom: Report full pressure range for Intuos, Cintiq 13HD TouchJason Gerecke2015-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jason.gerecke@wacom.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | | * HID: wacom: Add support for Cintiq Companion 2Jason Gerecke2015-10-213-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jason.gerecke@wacom.com> Signed-off-by: Clifford Jolly <expiredpopsicle@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | | * HID: wacom: Add four new Intuos devicesPing Cheng2015-09-233-28/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This series of devices supports both pen and touch. It reports touch data in Bamboo3 format and pen data in Intuos pro format. Signed-off-by: Ping Cheng <pingc@wacom.com> Tested-By: Aaron Skomra <aaron.skomra@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | | * HID: wacom: Cleanup unsupported device_type for BAMBOO_PTPing Cheng2015-09-233-30/+54
| | | | | | | | | |/ | | | | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all Bamboo support both pen and touch. Make sure we deal with pen only and touch only devices properly. Signed-off-by: Ping Cheng <pingc@wacom.com> Tested-By: Aaron Skomra <aaron.skomra@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | * HID: fix some indenting issuesJiri Slaby2015-10-214-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some drivers indent some lines in a very weird manner. Fix that. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | * HID: hid-input: allow input_configured callback return errorsDmitry Torokhov2015-09-3011-26/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jaikumarg@android.com> Signed-off-by: Arve Hjønnevåg <arve@android.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> Acked-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | * | | HID: multitouch: Fetch feature reports on demand for Win8 devicesMika Westerberg2015-10-121-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <benjamin.tissoires@redhat.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | * | | HID: multitouch: Add suffix for HID_DG_TOUCHPADMika Westerberg2015-09-291-0/+3
| | | | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of printing "UNKNOWN" as device suffix for HID_DG_TOUCHPAD call the device as "Touchpad". Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Daniel Martin <consume.noise@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | * | | HID: Add new Microsoft Type Cover 3 product IDDonavan Lance2015-09-234-0/+6
| | | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for Microsoft Type Cover 3 with 0x07e2 product ID. Signed-off-by: Donavan Lance <shvr@fedoraproject.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | * | | HID: logitech: Add support for G29Simon Wood2015-11-063-4/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present the G29 is mis-identified as a DFGT, this patch ensures that the wheel is correctly detected and allows setting the LEDs and turning range via the '/sys' interface. This wheel can also emulate other types of Logitech wheels. Signed-off-by: Simon Wood <simon@mungewell.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | * | | HID: logitech: Simplify wheel detection schemeSimon Wood2015-11-061-42/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplfy how hid-logitech driver detects the native mode of the wheel, done by looking at the USB-ID revision and comparing bit mask. Signed-off-by: Simon Wood <simon@mungewell.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | * | | HID: logitech-hidpp: add support to disable tap-to-click on the K400Benjamin Tissoires2015-09-041-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <balaton@eik.bme.hu> Tested-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | * | | HID: logitech-hidpp: split HIDPP_QUIRK_DELAYED_INIT in twoBenjamin Tissoires2015-09-041-9/+17
| | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | * | | HID: i2c-hid: Fill in physical device providing HID functionalityMika Westerberg2015-09-291-0/+1
| | | | | |/ | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently hid_connect() prints out following when I2C connected HID devices is connected: hid-multitouch 0018:03EB:2136.0001: ... [ATML3432:00 03EB:2136] on After "on " should read physical device name but it is left empty by the driver. Make it look better and fill in the physical device name. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Daniel Martin <consume.noise@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | * | HID: Make I2C a known bus in hid_connect()Daniel Martin2015-09-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just to prettify the log message. Otherwise it would be <UNKNOWN>. Signed-off-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | * | HID: saitek: mode button quirk for Mad Catz R.A.T.5Harald Brinkmann2015-09-044-3/+6
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <hbrinkmann@braincalibration.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | HID: dragonrise: fix HID Descriptor for 0x0006 PIDMaciej Zuk2015-09-041-0/+58
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <gzmlke@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: corsair: boolify struct k90_led.removedJiri Kosina2015-09-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 'removed' field of struct k90_led is in its nature bool, let's use it that way. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: corsair: Add Corsair Vengeance K90 driverClément Vuchener2015-09-305-0/+688
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a HID driver for the Corsair Vengeance K90 keyboard. It fixes the behaviour of the keys using incorrect HID usage codes and exposes the macro playback mode and current profile to the user space through sysfs attributes. It also adds two LED class devices controlling the "record" LED and the backlight. Signed-off-by: Clément Vuchener <clement.vuchener@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | HID: wacom: Expect 'touch_max' touches if HID_DG_CONTACTCOUNT not presentJason Gerecke2015-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | HID: wacom: Tie cached HID_DG_CONTACTCOUNT indices to report IDJason Gerecke2015-10-212-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | HID: sensor-hub: Add quirk for Lenovo Yoga 2 with ITE ChipsRitesh Raj Sarraf2015-10-052-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <rrs@debian.org> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | HID: usbhid: Fix for the WiiU adapter from MayflashOliver Schmitt2015-10-042-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <voltumna@gmx.net> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | HID: core: Avoid uninitialized buffer accessRichard Purdie2015-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <richard.purdie@linuxfoundation.org> [dvhart: Initialize string to "" rather than assign buf[0] = NULL;] Cc: Jiri Kosina <jikos@kernel.org> Cc: linux-input@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | HID: sensor-hub: Fixup for Lenovo ThinkPad Helix 2 sensor hub reportFernando D S Lima2015-09-041-0/+14
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <fernandodsl@gmail.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | HID: hid-gfrm: avoid warning for input_configured API changeArnd Bergmann2015-11-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <arnd@arndb.de> 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 <pgynther@google.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | HID: hid-input: allow input_configured callback return errorsDmitry Torokhov2015-11-0511-26/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jaikumarg@android.com> Signed-off-by: Arve Hjønnevåg <arve@android.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> Acked-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | HID: hid-gfrm: Google Fiber TV Box remote controlsPetri Gynther2015-10-263-0/+165
| | | | | | | | | | | | | | | | Add HID driver for Google Fiber TV Box remote controls Signed-off-by: Petri Gynther <pgynther@google.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Merge branch 'for-linus' of ↵Linus Torvalds2015-09-041-0/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 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 ...
| * Merge branch 'next' into for-linusDmitry Torokhov2015-09-0335-1333/+4373
| |\ | | | | | | | | | Prepare first round of input updates for 4.3 merge window.
| | * Input: elan_i2c - enable ELAN0100 acpi panelsMichele Curti2015-08-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Enable ELAN0100 touchpad driver, found on a Asus X205TA laptop, to gai 2,3 fingers tap and 2 fingers scroll. Signed-off-by: Michele Curti <michele.curti@gmail.com> Reviewed-by: Duson Lin <dusonlin@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Merge tag 'v4.2-rc3' into nextDmitry Torokhov2015-07-2035-1333/+4371
| | |\ | | | | | | | | | | | | Sync up with Linux 4.2-rc3 to bring in infrastructure (OF) pieces.
| | * | Input: elan_i2c - enable ELAN0600 acpi panelsBenjamin Tissoires2015-07-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELAN0600 seems to work just fine in mouse emulation mode through i2c-hid, but to have full raw touch support we need to register it in elan_i2c.ko Reported-and-tested-by: Alessio Treglia <alessio@debian.org> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Jiri Kosina <jkosina@suse.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | | Merge branch 'for-4.3/microsoft' into for-linusJiri Kosina2015-09-014-8/+14
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/hid/usbhid/hid-quirks.c
| * | | | HID: microsoft: Add Surface 3 type coverStephen Just2015-07-244-8/+14
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding support for the Microsoft Surface 3 (non-pro) Type Cover. The existing definitions and quirks are actually for the Surface Pro 3 type covers. I've renamed the old constants to reflect that they belong to the Surface Pro 3, and added a new constant and matching code for the Surface 3. Signed-off-by: Stephen Just <stephenjust@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
| | | |
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
*-------------------. \ \ \ Merge branches 'for-4.3/chicony', 'for-4.3/cp2112', 'for-4.3/i2c-hid', ↵Jiri Kosina2015-09-0119-291/+953
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'for-4.3/lenovo', 'for-4.3/logitech', 'for-4.3/multitouch', 'for-4.3/picolcd', 'for-4.3/rmi', 'for-4.3/sensor-hub', 'for-4.3/sony' and 'for-4.3/wacom' into for-linus
| | | | | | | | | | | * | | | HID: wacom: wacom_setup_numbered_buttons is local to wacom_wacJiri Kosina2015-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wacom_setup_numbered_buttons() is not used outside of wacom_wac.c, make it static. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | | | * | | | HID: wacom: Add support for Express Key Remote.Aaron Skomra2015-08-284-2/+351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device is pad (buttons) only, there is no stylus or touch. Up to five remotes can pair with the device's associated USB dongle. Signed-off-by: Aaron Skomra <aaron.skomra@wacom.com> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | | | * | | | HID: wacom: Set button bits based on a new numbered_buttonsAaron Skomra2015-08-282-115/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this commit, numbered button bit setting was done separately for each device type in wacom_setup_pad_capabilities(). Here we add a numbered_buttons property to the wacom_features struct and extract the repeated bit setting code to a new function: wacom_settup_numbered_buttons(). Signed-off-by: Aaron Skomra <aaron.skomra@wacom.com> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | | | * | | | HID: wacom: Use tablet-provided touch height/width values for INTUOSHTJason Gerecke2015-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current generation of "Intuos" tablets (i.e. INTUOSHT) report touch width and height data just like the "Intuos Pro" do. This commit changes the code to allow these tablets to use the appropriate codepath instead of the one intended for Intuos5/Bamboo. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | | | * | | | HID: wacom: Simplify 'wacom_pl_irq'Jason Gerecke2015-08-111-49/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | | | * | | | HID: wacom: Do not repeatedly attempt to set device mode on errorJason Gerecke2015-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As an extension of aef3156d7, there is no sense in repeatedly calling the 'wacom_set_report' and 'wacom_get_report' functions if they return an error. Getting an error from them implies that the device is out to lunch: either a hard error code was returned or repeated attempts at recovering from a "soft" error all failed. In either case, doing even more retries is not likely to resolve whatever is wrong. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | | | | | | | * | | | HID: wacom: Remove WACOM_QUIRK_NO_INPUTJason Gerecke2015-08-043-19/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WACOM_QUIRK_NO_INPUT is a signal to the driver that input devices should not be created for a particular device. This quirk was used by the wireless receiver to prevent any devices from being created during the initial probe (defering it instead until we got a tablet connection event in 'wacom_wireless_work'). This quirk is not necessary now that a device_type is associated with each device. Any input device allocated by 'wacom_allocate_inputs' which is not necessary for a particular device is freed in 'wacom_register_inputs'. In particular, none of the wireless receivers devices have the pen, pad, or touch device types set so the same effect is achieved without the need to be explicit. We now return early in wacom_retrieve_hid_descriptor for wireless devices (to prevent the device_type from being overridden) but since we ignore the HID descriptor for the wireless reciever anyway, this is not an issue. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
OpenPOWER on IntegriCloud