aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-03-05Merge branch 'for-5.1/wacom' into for-linusJiri Kosina2-21/+35
Wacom driver cleanups from Gustavo A. R. Silva and Jason Gerecke Support for Pro Pen slim from Jason Gerecke
2019-03-05Merge branch 'for-5.1/i2c-hid' into for-linusJiri Kosina6-84/+55
Fix dmesg flood for Elan touchpanels which are too slow to assert IRQ from Kai-Heng Feng
2019-03-05Merge branch 'for-5.1/ish' into for-linusJiri Kosina8-26/+26
Power management improvements from Song Hongyan Switch to new UUID API from Andy Shevchenko Generalization the driver bindin to support more than just sensors from Srinivas Pandruvada
2019-03-05Merge branch 'for-5.1/hid-uclogic' into for-linusJiri Kosina11-558/+2412
hid-uclogic driver revamp, in order to support wider range of Huion tablets, from Nikolai Kondrashov
2019-03-05Merge branch 'for-5.1/hid-topseed' into for-linusJiri Kosina2-0/+4
Toshiba WT10A tablet bluetooth keyboard support from Hans de Goede
2019-03-05Merge branch 'for-5.1/hid-sony' into for-linusJiri Kosina1-10/+21
Fixes for Shanwan PS3 support from Hongye Yuan
2019-03-05Merge branch 'for-5.1/hid-maltron' into for-linusJiri Kosina4-0/+174
Support for Maltron L90 from William Whistler
2019-03-05Merge branch 'for-5.1/hid-logitech' into for-linusJiri Kosina4-0/+68
Logitech WingMan Formula GP fix from Jarrad Whitaker
2019-03-05Merge branch 'for-5.1/hid-elan' into for-linusJiri Kosina1-1/+1
2019-03-05Merge branch 'for-5.1/hid-asus' into for-linusJiri Kosina2-16/+234
Asus Transbook T100CHI and T90CHI support from NOGUCHI Hiroshi
2019-02-21HID: Remove Waltop tablets from hid_have_special_driverNikolai Kondrashov1-9/+0
Tested with a Waltop tablet and it seems to work fine. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: Remove KYE tablets from hid_have_special_driverNikolai Kondrashov1-5/+0
Tested with one KYE tablet and it seems to work fine. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: Remove hid-uclogic entries from hid_have_special_driverNikolai Kondrashov1-17/+0
Tested with a couple UC-Logic tablets and it seems to work fine. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Do not initialize non-USB devicesNikolai Kondrashov1-2/+4
Do not try to initialize UC-Logic tablets if the underlying device is not a USB device, but e.g. a uhid device. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Add support for Ugee G5Nikolai Kondrashov5-0/+104
Add support for Ugee G5 to hid-uclogic. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Support Gray-coded rotary encodersNikolai Kondrashov2-0/+37
Add support for converting Gray-coded rotary encoder input into dial input compatible with HID standard. Needed for Ugee G5 support. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Support faking Wacom pad device IDNikolai Kondrashov2-0/+19
Add support for inserting a Wacom pad device ID into hid-uclogic reports. This allows reporting dial inputs in a way compatible with the Wacom driver. Needed for Ugee G5 support in particular. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Add support for XP-Pen Deco 01Nikolai Kondrashov5-0/+65
Add support for XP-Pen Deco 01 to hid-uclogic. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Add support for XP-Pen Star G640Nikolai Kondrashov3-0/+5
Add support for XP-Pen Star G640 to hid-uclogic. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Add support for XP-Pen Star G540Nikolai Kondrashov3-0/+5
Add support for XP-Pen Star G540 to hid-uclogic. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Add support for Ugee EX07S frame controlsNikolai Kondrashov3-2/+61
Add proper support for Ugee EX07(S) frame controls to hid-uclogic. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Add support for Ugee M540Nikolai Kondrashov2-3/+26
Add support for Ugee M540 to hid-uclogic. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Add support for Ugee 2150Nikolai Kondrashov3-0/+5
Add support for Ugee 2150 to hid-uclogic. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Support v2 protocolNikolai Kondrashov3-0/+278
Add support for UC-Logic v2 protocol to hid-uclogic. This adds support for a bunch of new Huion models. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Support fragmented high-res reportsNikolai Kondrashov2-0/+33
Support parsing fragmented high-resolution reports in hid-uclogic to support v2 reporting protocol. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Support in-range reporting emulationNikolai Kondrashov3-0/+58
Newer UC-Logic tablets, such as ones made by Huion have stopped reporting in-range state, but they're otherwise worthy tablets. The manufacturer was notified of the problem and promised to fix this in the future. Meanwhile, detect pen coming in range, and emulate the reports to the userspace, to make the tablets useable. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Designate current protocol v1Nikolai Kondrashov3-43/+43
Designate the current UC-Logic tablet initialization protocol v1, in preparation for adding support for v2 protocol. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Re-initialize tablets on resumeNikolai Kondrashov1-0/+21
Re-initialize UC-Logic tablets on resume. UC-Logic tablet initialization and parameter retrieval cannot be separated for the large part, so simply discard the retrieved parameters after initialization. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Extract tablet parameter discovery into a moduleNikolai Kondrashov4-327/+1090
Refactor and extract UC-Logic tablet initialization and parameter discovery into a module. For these tablets, the major part of parameter discovery cannot be separated from initialization so they have to be in the same module. Define explicitly and clearly what possible quirks the tablets may have to make the driver implementation easier and simpler. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: uclogic: Extract report descriptors to a moduleNikolai Kondrashov4-540/+745
As hid-uclogic has a lot of report descriptors already and there's going to be more, move them out of the driver code and into a separate module. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: Clarify vendor ID reuse by Ugee tabletsNikolai Kondrashov3-8/+8
Add "_UCLOGIC" to Ugee tablet device ID macros so it's clear they come with UC-Logic vendor ID. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: viewsonic: Support PD1011 signature padNikolai Kondrashov4-0/+118
Add support for ViewSonic PD1011 signature (display) pad, which is also sold by Signotec under a different name. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-21HID: kye: Add support for EasyPen M406XENikolai Kondrashov3-0/+85
Originally contributed by Andrey Alekseenko <al42and@gmail.com>. Signed-off-by: Andrey Alekseenko <al42and@gmail.com> Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-20HID: wacom: Add support for Pro Pen slimJason Gerecke1-0/+2
Wacom has introduced a new pen compatible with its MobileStudio Pro and other tablets. Although adding it to the tool ID tablet is not strictly necessary unrecognized pens are reported as BTN_TOOL_PEN already, unless the tablet sends the "eraser" bit, when BTN_TOOL_RUBBER is used instead), we'll keep it updated anyway. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-20HID: roccat: Mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/hid/hid-roccat-kone.c: In function ‘kone_keep_values_up_to_date’: drivers/hid/hid-roccat-kone.c:784:20: warning: this statement may fall through [-Wimplicit-fallthrough=] kone->actual_dpi = kone->profiles[event->value - 1]. ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ startup_dpi; ~~~~~~~~~~~ drivers/hid/hid-roccat-kone.c:786:2: note: here case kone_mouse_event_osd_profile: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-02-15HID: intel-ish-hid: remove data[128] usage on stack when sending HBM requestHong Liu3-63/+38
Instead of using an 128-byte on-stack array to store the request, we can instantiate the request on stack directly. This can save the stack usage of these functions, since most of the requests are much smaller than 128 bytes. Signed-off-by: Hong Liu <hong.liu@intel.com> Tested-by: Hongyan Song <hongyan.song@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-02-15HID: intel-ish-hid: move doorbell writing before flushHong Liu1-2/+2
Reading of IPC_REG_ISH_HOST_FWSTS will flush both message register and doorbell. So move the doorbell write before reading of IPC_REG_ISH_HOST_FWSTS. Signed-off-by: Hong Liu <hong.liu@intel.com> Tested-by: Hongyan Song <hongyan.song@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-02-15HID: intel-ish-hid: Optimize writing ipc message from queueHong Liu2-18/+3
Currently we are using one additional static variable and a spinlock to prevent contention of writing IPC messages to ISH hardware, which is not necessary. Once ISH is ready to accept new data, we can push new data to hardware. This pushing of new data is already protected by wr_processing_spinlock for contention, which is enough. So use this spinlock to check both readiness for accepting new data and once ready allow writing of ipc message from queue to ISH hardware. While here, cleaned up some space after return. Signed-off-by: Hong Liu <hong.liu@intel.com> Tested-by: Hongyan Song <hongyan.song@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-02-15HID: intel-ish-hid: avoid binding wrong ishtp_cl_deviceHong Liu1-1/+3
When performing a warm reset in ishtp bus driver, the ishtp_cl_device will not be removed, its fw_client still points to the already freed ishtp_device.fw_clients array. Later after driver finishing ishtp client enumeration, this dangling pointer may cause driver to bind the wrong ishtp_cl_device to the new client, causing wrong callback to be called for messages intended for the new client. This helps in development of firmware where frequent switching of firmwares is required without Linux reboot. Signed-off-by: Hong Liu <hong.liu@intel.com> Tested-by: Hongyan Song <hongyan.song@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-02-15HID: wacom: Mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/hid/wacom_wac.c: In function ‘wacom_setup_pen_input_capabilities’: drivers/hid/wacom_wac.c:3506:3: warning: this statement may fall through [-Wimplicit-fallthrough=] __clear_bit(ABS_MISC, input_dev->absbit); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/wacom_wac.c:3508:2: note: here case WACOM_MO: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: Ping Cheng <ping.cheng@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-02-14HID: fix Logitech WingMan Formula GP joined axesJarrad Whitaker4-0/+68
The Logitech WingMan Formula GP by default presents a combined accelerate/brake axis, so this patch assigns it to hid-logitech in order to benefit from the axis-splitting logic in lg4ff. There is also a fixed report descriptor for the resulting report. Signed-off-by: Jarrad Whitaker <jarrad.whitaker@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-02-14HID: multitouch: Lenovo X1 Tablet Gen3 trackpoint and buttonsMikael Wikström2-0/+7
Add support for the trackpoint and three mouse buttons on the type cover of the Lenovo X1 Tablet Gen3. This is the same as with the 2nd generation Lenovo X1 Tablet. Signed-off-by: Mikael Wikström <leakim.wikstrom@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-02-14HID: steam: fix boot loop with bluetooth firmwareRodrigo Rivas Costa1-23/+11
There is a new firmware for the Steam Controller with support for BLE connections. When using such a device with a wired connection, it reboots itself every 10 seconds unless an application has opened it. Doing hid_hw_open() unconditionally on probe fixes the issue, and the code becomes simpler. Signed-off-by: Rodrigo Rivas Costa <rodrigorivascosta@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-02-14HID: hid-asus: Add BT keyboard dock battery monitoring supportNOGUCHI Hiroshi1-0/+193
Add battery monitoring support for Transbook T100CHI/T90CHI's Bluetooth keyboard dock. They report rest battery level and charging status. Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-02-14HID: Add ASUS T100CHI keyboard dock battery quirksNOGUCHI Hiroshi1-0/+3
Add ASUS Transbook T100CHI/T90CHI keyboard dock into battery quirk list, in order to add specific implementation in hid-asus. Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-02-14HID: hid-asus: Add Transbook T90CHI supportNOGUCHI Hiroshi1-16/+38
Add Transbook T90CHI support into hid-asus. T90CHI returns same BT vendor/product values as T100CHI, so identifies T90CHI by name. Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-02-07HID: Add support for Toshiba WT10A tablet bluetooth keyboardHans de Goede2-0/+4
The bluetooth-keyboard which comes with the Toshiba WT10A tablet uses a couple of usage codes in the vendor specific ffbc page. The keyboard has a vendor-id of 04f2 which maps to Chicony. Other then adding a few keymappings for the ffbc usages, no special handling is necessary. So rather then adding a new hid-toshiba driver, this commit adds the ID and 2 extra key-mappings to the hid-topseed driver. The hid-topseed driver already contains mapping for some ffbc usages (and does nothing else) and it already binds to another Chicony manufactured keyboard. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-02-01HID: intel-ish-hid: Use VID/PID from ISHSrinivas Pandruvada1-2/+2
The Intel ISH HID can now have other devices attached to it, not just sensors. Hence ISH HID transport is no longer just used for sensors. Currently the vendor and product id is hardcoded for sensors, but they can be obtained from ISH firmware for the real device. The driver already extract them and store as part of device_info structure in client_data. So use vendor id/product id obtained from the ISH firmware. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-01-29HID: debug: fix the ring buffer implementationVladis Dronov1-73/+47
Ring buffer implementation in hid_debug_event() and hid_debug_events_read() is strange allowing lost or corrupted data. After commit 717adfdaf147 ("HID: debug: check length before copy_to_user()") it is possible to enter an infinite loop in hid_debug_events_read() by providing 0 as count, this locks up a system. Fix this by rewriting the ring buffer implementation with kfifo and simplify the code. This fixes CVE-2019-3819. v2: fix an execution logic and add a comment v3: use __set_current_state() instead of set_current_state() Link: https://bugzilla.redhat.com/show_bug.cgi?id=1669187 Cc: stable@vger.kernel.org # v4.18+ Fixes: cd667ce24796 ("HID: use debugfs for events/reports dumping") Fixes: 717adfdaf147 ("HID: debug: check length before copy_to_user()") Signed-off-by: Vladis Dronov <vdronov@redhat.com> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-01-29HID: wacom: Move HID fix for AES serial number into wacom_hid_usage_quirkJason Gerecke2-21/+32
The 'wacom_hid_usage_quirk' function is the intended home for fixing up descriptors that are buggy or that don't quite fit the mold. Commit 578325120e was supposed to move all of these quirks but it missed the code to handle fixup the serial number usages for AES pens. Lets move this code out of 'wacom_wac_pen_usage_mapping' where it was previously lurking and put it into the same place as the others. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>