aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-11-01Merge tag 'platform-drivers-x86-v4.20-1' of git://git.infradead.org/linux-platform-drivers-x86Linus Torvalds2-1/+23
Pull x86 platform driver updates from Darren Hart: - Move the Dell dcdbas and dell_rbu drivers into platform/drivers/x86 as they are closely coupled with other drivers in this location. - Improve _init* usage for acerhdf and fix some usage issues with messages and module parameters. - Simplify asus-wmi by calling ACPI/WMI methods directly, eliminating workqueue overhead, eliminate double reporting of keyboard backlight. - Fix wake from USB failure on Bay Trail devices (intel_int0002_vgpio). - Notify intel_telemetry users when IPC1 device is not enabled. - Update various drivers with new laptop model IDs. - Update several intel drivers to use SPDX identifers and order headers alphabetically. * tag 'platform-drivers-x86-v4.20-1' of git://git.infradead.org/linux-platform-drivers-x86: (64 commits) HID: asus: only support backlight when it's not driven by WMI platform/x86: asus-wmi: export function for evaluating WMI methods platform/x86: asus-wmi: Only notify kbd LED hw_change by fn-key pressed platform/x86: wmi: declare device_type structure as constant platform/x86: ideapad: Add Y530-15ICH to no_hw_rfkill platform/x86: Add Intel AtomISP2 dummy / power-management driver platform/x86: touchscreen_dmi: Add min-x and min-y settings for various models platform/x86: touchscreen_dmi: Add info for the Onda V80 Plus v3 tablet platform/x86: touchscreen_dmi: Add info for the Trekstor Primetab T13B tablet platform/x86: intel_telemetry: Get rid of custom macro platform/x86: intel_telemetry: report debugfs failure MAINTAINERS: intel_telemetry: Update maintainers info platform/x86: Add LG Gram laptop special features driver platform/x86: asus-wmi: Simplify the keyboard brightness updating process platform/x86: touchscreen_dmi: Add info for the Trekstor Primebook C11 convertible platform/x86: mlx-platform: Properly use mlxplat_mlxcpld_msn201x_items MAINTAINERS: intel_pmc_core: Update MAINTAINERS firmware: dcdbas: include linux/io.h platform/x86: intel-wmi-thunderbolt: Add dynamic debugging platform/x86: intel-wmi-thunderbolt: Convert to use SPDX identifier ...
2018-10-31HID: asus: only support backlight when it's not driven by WMIDaniel Drake2-1/+23
The Asus GL502VSK has the same 0B05:1837 keyboard as we've seen in several Republic of Gamers laptops. However, in this model, the keybard backlight control exposed by hid-asus has no effect on the keyboard backlight. Instead, the keyboard backlight is correctly driven by asus-wmi. With two keyboard backlight devices available (and only the acer-wmi one working), GNOME is picking the wrong one to drive in the UI. Avoid this problem by not creating the backlight interface when we detect a WMI-driven keyboard backlight. We have also tested Asus GL702VMK which does have the hid-asus backlight present, and it still works fine with this patch (WMI method call returns UNSUPPORTED_METHOD). A direct "depends on ASUS_WMI" is intentionally avoided so that HID_ASUS users who have ASUS_WMI=n will not quietly lose their HID_ASUS driver on a kernel upgrade. Signed-off-by: Daniel Drake <drake@endlessm.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-10-29Merge tag 'media/v4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-mediaLinus Torvalds1-2/+1
Pull media updates from Mauro Carvalho Chehab: - new dvb frontend driver: lnbh29 - new sensor drivers: imx319 and imx 355 - some old soc_camera driver renames to avoid conflict with new drivers - new i.MX Pixel Pipeline (PXP) mem-to-mem platform driver - a new V4L2 frontend for the FWHT codec - several other improvements, bug fixes, code cleanups, etc * tag 'media/v4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (289 commits) media: rename soc_camera I2C drivers media: cec: forgot to cancel delayed work media: vivid: Support 480p for webcam capture media: v4l2-tpg: fix kernel oops when enabling HFLIP and OSD media: vivid: Add 16-bit bayer to format list media: v4l2-tpg-core: Add 16-bit bayer media: pvrusb2: replace `printk` with `pr_*` media: venus: vdec: fix decoded data size media: cx231xx: fix potential sign-extension overflow on large shift media: dt-bindings: media: rcar_vin: add device tree support for r8a7744 media: isif: fix a NULL pointer dereference bug media: exynos4-is: make const array config_ids static media: cx23885: make const array addr_list static media: ivtv: make const array addr_list static media: bttv-input: make const array addr_list static media: cx18: Don't check for address of video_dev media: dw9807-vcm: Fix probe error handling media: dw9714: Remove useless error message media: dw9714: Fix error handling in probe function media: cec: name for RC passthrough device does not need 'RC for' ...
2018-10-29HID: input: simplify/fix high-res scroll event handlingLinus Torvalds1-22/+21
Commit 1ff2e1a44e02 ("HID: input: Create a utility class for counting scroll events") created the helper function hid_scroll_counter_handle_scroll() to handle high-res scroll events and also expose them as regular wheel events. But the resulting algorithm was unstable, and causes scrolling to be very unreliable. When you hit the half-way mark of the highres multiplier, small highres movements will incorrectly translate into big traditional wheel movements, causing odd jitters. Simplify the code and make the output stable. NOTE! I'm pretty sure this will need further tweaking. But this at least turns a unusable mouse wheel on my Logitech MX Anywhere 2S into a usable one. Cc: Jiri Kosina <jikos@kernel.org> Cc: Harry Cutts <hcutts@chromium.org> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-10-27HID: we do not randomly make new drivers 'default y'Linus Torvalds1-1/+0
.. even when that "default y" is hidden syntactically as a default !EXPERT it's wrong. The only reason something should be 'default y' is if it used to be built-in, and it was made configurable, and the 'default y' is just retaining the status quo. Altheratively, the hardware for the driver has become _so_ common that it really makes sense for everybody to build it. Finally, one possible reason for 'default y' is because the option is not enabling any new code at all, but is just enabling other options (the networking people do this for vendor options, for example, so that you can disable whole vendors at a time). Clearly, none of these cases hold for the BigBen Interactive Kids' gamepad, and HID_BIGBEN_FF should thus most definitely not default to on for everybody. Cc: Hanno Zulla <kontakt@hanno.de> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-10-27i2c-hid: properly terminate i2c_hid_dmi_desc_override_table[] arrayLinus Torvalds1-1/+2
Commit 9ee3e06610fd ("HID: i2c-hid: override HID descriptors for certain devices") added a new dmi_system_id quirk table to override certain HID report descriptors for some systems that lack them. But the table wasn't properly terminated, causing the dmi matching to walk off into la-la-land, and starting to treat random data as dmi descriptor pointers, causing boot-time oopses if you were at all unlucky. Terminate the array. We really should have some way to just statically check that arrays that should be terminated by an empty entry actually are so. But the HID people really should have caught this themselves, rather than have me deal with an oops during the merge window. Tssk, tssk. Cc: Julian Sax <jsbc@gmx.de> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-10-23Merge branch 'for-4.20/multitouch' into for-linusJiri Kosina1-40/+32
hid-multitouch driver cleanup
2018-10-23Merge branch 'for-4.20/microsoft' into for-linusJiri Kosina3-5/+138
Rumble support for Xbox One S
2018-10-23Merge branch 'for-4.20/logitech-highres' into for-linusJiri Kosina2-27/+327
High-resolution support for hid-logitech
2018-10-23Merge branch 'for-4.20/i2c-hid' into for-linusJiri Kosina13-117/+627
- general cleanups of hid-i2c driver - SPIODEV device descriptor fixes
2018-10-23Merge branch 'for-4.20/google' into for-linusJiri Kosina2-20/+395
Whisker device specific fixes to hid-google driver
2018-10-23Merge branch 'for-4.20/cougar' into for-linusJiri Kosina1-18/+48
Functional fixes for hid-cougar driver
2018-10-23Merge branch 'for-4.20/core' into for-linusJiri Kosina2-5/+16
Fixes and new features for driver core. Highlights: - maximum global item tag report size gets increased to 256 - improved INPUT_PROP reporting for Digitizer devices
2018-10-23Merge branch 'for-4.20/bigbenff' into for-linusJiri Kosina4-0/+431
Driver for BigBen Interactive PS3OFMINIPAD
2018-10-23Merge branch 'for-4.20/apple' into for-linusJiri Kosina2-11/+132
Support for Apple Magic Trackpad 2
2018-10-11HID: usbhid: Add quirk for Redragon/Dragonrise Seymur 2Kai-Heng Feng2-0/+2
Redragon Seymur 2 stops working since commit 190d7f02ce8e ("HID: input: do not increment usages when a duplicate is found"). Use quirk HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE suggested by the commit can solve the issue. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200995 BugLink: https://bugs.launchpad.net/bugs/1793846 Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-10-11HID: wacom: Work around HID descriptor bug in DTK-2451 and DTH-2452Jason Gerecke1-0/+19
The DTK-2451 and DTH-2452 have a buggy HID descriptor which incorrectly contains a Cintiq-like report, complete with pen tilt, rotation, twist, serial number, etc. The hardware doesn't actually support this data but our driver duitifully sets up the device as though it does. To ensure userspace has a correct view of devices without updated firmware, we clean up this incorrect data in wacom_setup_device_quirks. We're also careful to clear the WACOM_QUIRK_TOOLSERIAL flag since its presence causes the driver to wait for serial number information (via wacom_wac_pen_serial_enforce) that never comes, resulting in the pen being non-responsive. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Fixes: 8341720642 ("HID: wacom: Queue events with missing type/serial data for later processing") Cc: stable@vger.kernel.org # v4.16+ Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-10-10HID: google: add dependency on Cros EC for HammerDmitry Torokhov1-1/+1
Whiskers tablet mode support needs access to Chrome Embedded Controller, so we need to add dependency on MFD_CROS_EC. Reported-by: kbuild test robot <lkp@intel.com> Fixes: eb1aac4c8744 ("HID: google: add support tablet mode switch for Whiskers") Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-10-09HID: elan: fix spelling mistake "registred" -> "registered"Colin Ian King1-1/+1
Trivial fix to spelling mistake in hid_err error message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-10-09HID: google: drop superfluous const before SIMPLE_DEV_PM_OPS()Jiri Kosina1-1/+1
SIMPLE_DEV_PM_OPS() already implies const for the type; drop the extra modifier. Fixes: eb1aac4c8744f75460c34d71b0c73bebf3e8ee5c ("HID: google: add support tablet mode switch for Whiskers") Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-10-09HID: google: add support tablet mode switch for WhiskersDmitry Torokhov1-19/+394
Whiskers is a foldable base, and thus requires combining "base presence" signal coming from EC with base state signal (folded/unfolded) coming from USB/HID interface to produce proper SW_TABLET_MODE event. Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-10-04media: rc: Remove init_ir_raw_event and DEFINE_IR_RAW_EVENT macrosSean Young1-2/+1
This can be done with c99 initializers, which makes the code cleaner and more transparent. It does require gcc 4.6, because of this bug in earlier versions: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 Since commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"), this is the case. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-10-03HID: magicmouse: add support for Apple Magic Trackpad 2Sean O'Brien2-11/+132
USB device Vendor 05ac (Apple) Device 0265 (Magic Trackpad 2) Bluetooth device Vendor 004c (Apple) Device 0265 (Magic Trackpad 2) Add support for Apple Magic Trackpad 2 over USB and bluetooth, putting the device in multi-touch mode. Signed-off-by: Claudio Mettler <claudio@ponyfleisch.ch> Signed-off-by: Marek Wyborski <marek.wyborski@emwesoft.com> Signed-off-by: Sean O'Brien <seobrien@chromium.org> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-29HID: i2c-hid: override HID descriptors for certain devicesJulian Sax4-20/+439
A particular touchpad (SIPODEV SP1064) refuses to supply the HID descriptors. This patch provides the framework for overriding these descriptors based on DMI data. It also includes the descriptors for said touchpad, which were extracted by listening to the traffic of the windows filter driver, as well as the DMI data for the laptops known to use this device. Relevant Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1526312 Cc: Hans de Goede <hdegoede@redhat.com> Reported-and-tested-by: ahormann@gmx.net Reported-and-tested-by: Bruno Jesus <bruno.fl.jesus@gmail.com> Reported-and-tested-by: Dietrich <enaut.w@googlemail.com> Reported-and-tested-by: kloxdami@yahoo.com Signed-off-by: Julian Sax <jsbc@gmx.de> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-24HID: hid-bigbenff: driver for BigBen Interactive PS3OFMINIPAD gamepadHanno Zulla4-0/+431
This is a driver to fix input mapping and add LED & force feedback support for the "BigBen Interactive Kid-friendly Wired Controller PS3OFMINIPAD SONY" gamepad with USB id 146b:0902. It was originally sold as a PS3 accessory and makes a very nice gamepad for Retropie. Signed-off-by: Hanno Zulla <kontakt@hanno.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-24HID: intel-ish-hid: Enable Ice Lake mobileSrinivas Pandruvada2-0/+2
Added PCI ID for Ice Lake mobile platform. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-24HID: logitech: fix a used uninitialized GCC warningzhong jiang1-5/+3
Fix the following compile warning: drivers/hid/hid-logitech-hidpp.c: In function 'hi_res_scroll_enable': drivers/hid/hid-logitech-hidpp.c:2714:54: warning: 'multiplier' may be used uninitialized in this function [-Wmaybe-uninitialized] hidpp->vertical_wheel_counter.resolution_multiplier = multiplier; Signed-off-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-24HID: intel-ish-hid: using list_head for ipc write queueHong Liu2-19/+15
Currently wr_msg_ctl_info is used in ishtp_device just for list head purpose, using list_head directly can save ~150 bytes size for each replacement. Also this patch can save ~170 bytes of code size in intel-ish-ipc.ko. Signed-off-by: Hong Liu <hong.liu@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-24HID: intel-ish-hid: use resource-managed apiHong Liu1-51/+24
Use resource-managed api to simplify error handling in probe and driver remove logic. With this patch, we can save ~170 bytes code size in intel-ish-ipc.ko. before: text data bss dec hex filename 11495 1568 72 13135 334f intel-ish-ipc.ko after: text data bss dec hex filename 11327 1568 72 12967 32a7 intel-ish-ipc.ko Signed-off-by: Hong Liu <hong.liu@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-24HID: intel_ish-hid: Enhance API to get ring buffer sizesSrinivas Pandruvada3-0/+31
Added two APIs: - ishtp_cl_get_tx_free_buffer_size: This returns total size available for a client to queue TX data. - ishtp_cl_get_tx_free_rings: This returns total number of TX rings available for a client. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-24HID: intel-ish-hid: use helper function to search client idEven Xu1-8/+6
ishtp exposed helper ishtp_fw_cl_get_client() function for client information searching, so switch to use it. Signed-off-by: Even Xu <even.xu@intel.com> Reviewed-by: Andriy Shevchenko <andriy.shevchenko@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-24HID: intel-ish-hid: ishtp: add helper function for client searchEven Xu2-0/+27
Add helper function ishtp_fw_cl_get_client() for client driver searching client information to hide internal details from callers. Signed-off-by: Even Xu <even.xu@intel.com> Reviewed-by: Andriy Shevchenko <andriy.shevchenko@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-24HID: intel-ish-hid: use helper function to access client bufferEven Xu1-12/+1
ishtp bus driver exposed helper functions for client buffer accessing, so change to use these functions in ishtp-hid-client driver to avoid access client buffer directly. Signed-off-by: Even Xu <even.xu@intel.com> Reviewed-by: Andriy Shevchenko <andriy.shevchenko@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-24HID: intel-ish-hid: ishtp: add helper functions for client buffer operationEven Xu2-0/+47
Add helper ishtp_cl_tx_empty() and ishtp_cl_rx_get_rb() to hide internal details from callers, who needs this functionality. Signed-off-by: Even Xu <even.xu@intel.com> Reviewed-by: Andriy Shevchenko <andriy.shevchenko@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-24HID: intel-ish-hid: use helper function for private driver data set/getEven Xu1-7/+7
Use helper set/get function to set/get driver data in ishtp-hid-client driver instead of directly accessing cl_device driver_data member. Signed-off-by: Even Xu <even.xu@intel.com> Reviewed-by: Andriy Shevchenko <andriy.shevchenko@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-24HID: intel-ish-hid: ishtp: add helper function for driver data get/setEven Xu2-0/+30
Add helper function ishtp_set_drvdata() and ishtp_get_drvdata() for different ISH client drivers to set/get private driver data. Signed-off-by: Even Xu <even.xu@intel.com> Reviewed-by: Andriy Shevchenko <andriy.shevchenko@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-24HID: i2c-hid: Remove RESEND_REPORT_DESCR quirk and its handlingHans de Goede2-16/+3
Commit 52cf93e63ee6 ("HID: i2c-hid: Don't reset device upon system resume") removes the need for the RESEND_REPORT_DESCR quirk for Raydium devices, but kept it for the SIS device id 10FB touchscreens, as the author of that commit could not determine if the quirk is still necessary there. I've tested suspend/resume on a Toshiba Click Mini L9W-B which is the device for which this quirk was added in the first place and with the "Don't reset device upon system resume" fix the quirk is no longer necessary, so this commit removes it. Note even better I also had some other devices with SIS touchscreens which suspend/resume issues, where the RESEND_REPORT_DESCR quirk did not help. I've also tested these devices with the "Don't reset device upon system resume" fix and I'm happy to report that that fix also fixes touchscreen resume on the following devices: Asus T100HA Asus T200TA Peaq C1010 Cc: Kai-Heng Feng <kai.heng.feng@canonical.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-14HID: i2c-hid: disable runtime PM operations on hantick touchpadAnisse Astier1-3/+8
This hantick HTIX5288 touchpad can quickly fall in a wrong state if there are too many open/close operations. This will either make it stop reporting any input, or will shift all the input reads by a few bytes, making it impossible to decode. Here, we never release the probed touchpad runtime pm while the driver is loaded, which should disable all runtime pm suspend/resumes. This fast repetition of sleep/wakeup is also more likely to happen when using runtime PM, which is why the quirk is done there, and not for all power downs, which would include suspend or module removal. Signed-off-by: Anisse Astier <anisse@astier.eu> Cc: stable@vger.kernel.org Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Philip Müller <philm@manjaro.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-06HID: i2c-hid: Don't reset device upon system resumeKai-Heng Feng2-10/+7
Raydium touchscreen triggers interrupt storm after system-wide suspend: [ 179.085033] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/65535) According to Raydium, Windows driver does not reset the device after system resume. The HID over I2C spec does specify a reset should be used at intialization, but it doesn't specify if reset is required for system suspend. Tested this patch on other i2c-hid touchpanels I have and those touchpanels do work after S3 without doing reset. If any regression happens to other touchpanel vendors, we can use quirk for Raydium devices. There's still one device uses I2C_HID_QUIRK_RESEND_REPORT_DESCR so keep it there. Cc: Aaron Ma <aaron.ma@canonical.com> Cc: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-05HID: input: Set INPUT_PROP_-property for HID_UP_DIGITIZERSTatsunosuke Tobita1-0/+5
Some system may want to know if a detected digitizer device is either an integrated or an external device. In order to distinguish such condition, setting either INPUT_PROP_DIRECT or INPUT_PROP_POINTER is required, checking the member, "application", in "hid_field" structure. Signed-off-by: Tatsunosuke Tobita <tobita.tatsunosuke@wacom.co.jp> Reviewed-by: Ping Cheng <ping.cheng@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-05HID: microsoft: the driver now neeed MEMLESS_FF infrastructureJiri Kosina1-0/+1
Reflect that fact in Kconfig, the same we do for other such drivers. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-05HID: cougar: Stop processing vendor events on hid-coreDaniel M. Lambea1-7/+13
Special key events received by the custom vendor's hdev are translated to key events on the kbd iface's input device, so their processing must not continue. Return -EPERM from raw_event handler to effectively stop source events from being processed in hid-core. Signed-off-by: Daniel M. Lambea <dmlambea@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-05HID: cougar: Make parameter 'g6_is_space' dinamically settableDaniel M. Lambea1-11/+35
Parameter g6_is_space instructs the driver to map G6 keypresses to KEY_SPACE (true) or to KEY_F18 (false). Make the parameter configurable via module_param_cb to allow users to change its value without reloading the module. Signed-off-by: Daniel M. Lambea <dmlambea@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-05HID: sensor-hub: Restore fixup for Lenovo ThinkPad Helix 2 sensor hub reportHans de Goede1-0/+23
Commit b0f847e16c1e ("HID: hid-sensor-hub: Force logical minimum to 1 for power and report state") not only replaced the descriptor fixup done for devices with the HID_SENSOR_HUB_ENUM_QUIRK with a generic fix, but also accidentally removed the unrelated descriptor fixup for the Lenovo ThinkPad Helix 2 sensor hub. This commit restores this fixup. Restoring this fixup not only fixes the Lenovo ThinkPad Helix 2's sensors, but also the Lenovo ThinkPad 8's sensors. Fixes: b0f847e16c1e ("HID: hid-sensor-hub: Force logical minimum ...") Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: Fernando D S Lima <fernandodsl@gmail.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-05HID: microsoft: Add rumble support for Xbox One S controllerAndrey Smirnov2-0/+117
Add HID quirk driver for Xbox One S controller over bluetooth. This driver only adds support for rumble. Standard controller functionality is exposed by default HID driver. [jkosina@suse.cz: straightforward rebase on more recent driver code] Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Pierre-Loup A. Griffais <pgriffais@valvesoftware.com> Signed-off-by: Juha Kuikka <juha.kuikka@gmail.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-05HID: microsoft: Convert private data to be a proper structAndrey Smirnov1-5/+20
In order to be able to have more than just an unsigned long worth of private data, convert the code to allocate and use a dedicated struct. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Pierre-Loup A. Griffais <pgriffais@valvesoftware.com> Signed-off-by: Juha Kuikka <juha.kuikka@gmail.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-05HID: logitech: Use LDJ_DEVICE macro for existing Logitech miceHarry Cutts1-10/+5
Signed-off-by: Harry Cutts <hcutts@chromium.org> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-05HID: logitech: Enable high-resolution scrolling on Logitech miceHarry Cutts1-4/+245
There are three features used by various Logitech mice for high-resolution scrolling: the scrolling acceleration bit in HID++ 1.0, and the x2120 and x2121 features in HID++ 2.0 and above. This patch supports all three, and uses the multiplier reported by the mouse for the HID++ 2.0+ features. The full list of product IDs of mice which support high-resolution scrolling was provided by Logitech, but the patch was tested using the following mice (using the Unifying receiver): * HID++ 1.0: Anywhere MX, Performance MX * x2120: M560 * x2121: MX Anywhere 2, MX Master 2S Signed-off-by: Harry Cutts <hcutts@chromium.org> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-05HID: logitech: Add function to enable HID++ 1.0 "scrolling acceleration"Harry Cutts1-13/+34
"Scrolling acceleration" is a bit of a misnomer: it doesn't deal with acceleration at all. However, that's the name used in Logitech's spec, so I used it here. Signed-off-by: Harry Cutts <hcutts@chromium.org> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-09-05HID: input: Create a utility class for counting scroll eventsHarry Cutts1-0/+45
To avoid code duplication, this class counts high-resolution scroll movements and emits the legacy low-resolution events when appropriate. Drivers should be able to create one instance for each scroll wheel that they need to handle. Signed-off-by: Harry Cutts <hcutts@chromium.org> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>