aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid
AgeCommit message (Collapse)AuthorFilesLines
2018-11-21HID: cougar: Add support for Cougar 700K Gaming KeyboardDaniel M. Lambea2-0/+3
Add USB ID 060b:700a to the list of valid USB IDS for the cougar hid driver. Signed-off-by: Daniel M. Lambea <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
2018-11-20HID: Add quirk for Primax PIXART OEM miceSebastian Parschauer2-0/+4
The PixArt OEM mice are known for disconnecting every minute in runlevel 1 or 3 if they are not always polled. So add quirk ALWAYS_POLL for two Primax mice as well. 0x4e22 is the Dell MS111-P and 0x4d0f is the unbranded HP Portia mouse HP 697738-001. Both were built until approx. 2014. Those were the standard mice from those vendors and are still around - even as new old stock. Reference: https://github.com/sriemer/fix-linux-mouse/issues/11 Signed-off-by: Sebastian Parschauer <[email protected]> CC: [email protected] Signed-off-by: Jiri Kosina <[email protected]>
2018-11-19HID: i2c-hid: Disable runtime PM for LG touchscreenKai-Heng Feng2-0/+3
LG touchscreen (1fd2:8001) stops working after reboot: [ 4.859153] i2c_hid i2c-SAPS2101:00: i2c_hid_get_input: incomplete report (64/66) [ 4.936070] i2c_hid i2c-SAPS2101:00: i2c_hid_get_input: incomplete report (64/66) [ 9.948224] i2c_hid i2c-SAPS2101:00: failed to reset device. The device in question stops working after receives SLEEP, ON, SLEEP commands in a short period. The scenario is like this: - Once the desktop session closes, it also closed the hid device, so the device gets runtime suspended and receives a SLEEP command. - Before calling shutdown callback, it gets runtime resumed and received an ON command. - In the shutdown callback, it receives another SLEEP command. I failed to find a reliable interval between ON/SLEEP commands that can make it work, so let's simply disable runtime PM for the device. Signed-off-by: Kai-Heng Feng <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2018-11-19HID: multitouch: Add pointstick support for Cirque TouchpadKai-Heng Feng2-0/+9
Cirque Touchpad/Pointstick combo is similar to Alps devices, it requires MT_CLS_WIN_8_DUAL to expose its pointstick as a mouse. Signed-off-by: Kai-Heng Feng <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2018-11-19HID: steam: remove input device when a hid client is running.Rodrigo Rivas Costa1-64/+90
Previously, when a HID client such as the Steam Client was running, this driver disabled its input device to avoid doubling the input events. While it worked mostly fine, some games got confused by the idle gamepad, and switched to two player mode, or asked the user to choose which gamepad to use. Other games just crashed, probably a bug in Unity [1]. With this commit, when a HID client starts, the input device is removed; when the HID client ends the input device is recreated. [1]: https://github.com/ValveSoftware/steam-for-linux/issues/5645 Signed-off-by: Rodrigo Rivas Costa <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2018-11-19Revert "HID: uhid: use strlcpy() instead of strncpy()"David Herrmann1-6/+7
This reverts commit 336fd4f5f25157e9e8bd50e898a1bbcd99eaea46. Please note that `strlcpy()` does *NOT* do what you think it does. strlcpy() *ALWAYS* reads the full input string, regardless of the 'length' parameter. That is, if the input is not zero-terminated, strlcpy() will *READ* beyond input boundaries. It does this, because it always returns the size it *would* copy if the target was big enough, not the truncated size it actually copied. The original code was perfectly fine. The hid device is zero-initialized and the strncpy() functions copied up to n-1 characters. The result is always zero-terminated this way. This is the third time someone tried to replace strncpy with strlcpy in this function, and gets it wrong. I now added a comment that should at least make people reconsider. Signed-off-by: David Herrmann <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2018-11-19HID: uhid: forbid UHID_CREATE under KERNEL_DS or elevated privilegesEric Biggers1-0/+12
When a UHID_CREATE command is written to the uhid char device, a copy_from_user() is done from a user pointer embedded in the command. When the address limit is KERNEL_DS, e.g. as is the case during sys_sendfile(), this can read from kernel memory. Alternatively, information can be leaked from a setuid binary that is tricked to write to the file descriptor. Therefore, forbid UHID_CREATE in these cases. No other commands in uhid_char_write() are affected by this bug and UHID_CREATE is marked as "obsolete", so apply the restriction to UHID_CREATE only rather than to uhid_char_write() entirely. Thanks to Dmitry Vyukov for adding uhid definitions to syzkaller and to Jann Horn for commit 9da3f2b740544 ("x86/fault: BUG() when uaccess helpers fault on kernel addresses"), allowing this bug to be found. Reported-by: [email protected] Fixes: d365c6cfd337 ("HID: uhid: add UHID_CREATE and UHID_DESTROY events") Cc: <[email protected]> # v3.6+ Cc: Jann Horn <[email protected]> Cc: Andy Lutomirski <[email protected]> Signed-off-by: Eric Biggers <[email protected]> Reviewed-by: Jann Horn <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2018-11-16iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbersHans de Goede2-4/+11
Before this commit sensor_hub_input_attr_get_raw_value() failed to take the signedness of 16 and 8 bit values into account, returning e.g. 65436 instead of -100 for the z-axis reading of an accelerometer. This commit adds a new is_signed parameter to the function and makes all callers pass the appropriate value for this. While at it, this commit also fixes up some neighboring lines where statements were needlessly split over 2 lines to improve readability. Signed-off-by: Hans de Goede <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Acked-by: Benjamin Tissoires <[email protected]> Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2018-11-15Input: hyper-v - fix wakeup from suspend-to-idleVitaly Kuznetsov1-1/+1
It makes little sense but still possible to put Hyper-V guests into suspend-to-idle state. To wake them up two wakeup sources were registered in the past: hyperv-keyboard and hid-hyperv. However, since commit eed4d47efe95 ("ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle") pm_wakeup_event() from these devices is ignored. Switch to pm_wakeup_hard_event() API as these devices are actually the only possible way to wakeup Hyper-V guests. Fixes: eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle) Reviewed-by: Rafael J. Wysocki <[email protected]> Acked-by: K. Y. Srinivasan <[email protected]> Acked-by: Jiri Kosina <[email protected]> Signed-off-by: Vitaly Kuznetsov <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2018-11-12HID: hidraw: enforce minors_lock locking via lockdepJiri Kosina1-4/+4
lockdep is much more powerful enforcing the locking rules than code comments, so let's switch to it. Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2018-11-12HID: input: Ignore battery reported by Symbol DS4308Benson Leung2-0/+4
The Motorola/Zebra Symbol DS4308-HD is a handheld USB barcode scanner which does not have a battery, but reports one anyway that always has capacity 2. Let's apply the IGNORE quirk to prevent it from being treated like a power supply so that userspaces don't get confused that this accessory is almost out of power and warn the user that they need to charge their wired barcode scanner. Reported here: https://bugs.chromium.org/p/chromium/issues/detail?id=804720 Signed-off-by: Benson Leung <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
2018-11-08HID: Add quirk for Microsoft PIXART OEM mouseSebastian Parschauer2-0/+2
The PixArt OEM mice are known for disconnecting every minute in runlevel 1 or 3 if they are not always polled. So add quirk ALWAYS_POLL for this one as well. References: https://www.spinics.net/lists/linux-usb/msg88965.html http://linet.gr.jp/~kojima/PlamoWeb/ML/htdocs/201808/msg00019.html Signed-off-by: Sebastian Parschauer <[email protected]> CC: [email protected] Signed-off-by: Jiri Kosina <[email protected]>
2018-11-06HID: asus: fix build warning wiht CONFIG_ASUS_WMI disabledArnd Bergmann1-0/+3
asus_wmi_evaluate_method() is an empty dummy function when CONFIG_ASUS_WMI is disabled, or not reachable from a built-in device driver. This leads to a theoretical evaluation of an uninitialized variable that the compiler complains about, failing to check that the hardcoded return value makes this an unreachable code path: In file included from include/linux/printk.h:336, from include/linux/kernel.h:14, from include/linux/list.h:9, from include/linux/dmi.h:5, from drivers/hid/hid-asus.c:29: drivers/hid/hid-asus.c: In function 'asus_input_configured': include/linux/dynamic_debug.h:135:3: error: 'value' may be used uninitialized in this function [-Werror=maybe-uninitialized] __dynamic_dev_dbg(&descriptor, dev, fmt, \ ^~~~~~~~~~~~~~~~~ drivers/hid/hid-asus.c:359:6: note: 'value' was declared here u32 value; ^~~~~ With an extra IS_ENABLED() check, the warning goes away. Fixes: 3b692c55e58d ("HID: asus: only support backlight when it's not driven by WMI") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2018-11-06Merge branch 'master' into for-4.20/upstream-fixesJiri Kosina5-27/+47
Pull in a merge commit that brought in 3b692c55e58d ("HID: asus: only support backlight when it's not driven by WMI") so that fixup could be applied on top of it.
2018-11-01Merge tag 'platform-drivers-x86-v4.20-1' of ↵Linus Torvalds2-1/+23
git://git.infradead.org/linux-platform-drivers-x86 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 <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2018-10-31HID: i2c-hid: add Direkt-Tek DTLAPY133-1 to descriptor overrideJulian Sax1-0/+8
This device uses the SIPODEV SP1064 touchpad, which does not supply descriptors, so it has to be added to the override list. Reported-by: Tim Aldridge <[email protected]> Signed-off-by: Julian Sax <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2018-10-29Merge tag 'media/v4.20-1' of ↵Linus Torvalds1-2/+1
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 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 <[email protected]> Cc: Harry Cutts <[email protected]> Cc: Benjamin Tissoires <[email protected]> Cc: Peter Hutterer <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
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 <[email protected]> Cc: Jiri Kosina <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
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 <[email protected]> Cc: Benjamin Tissoires <[email protected]> Cc: Jiri Kosina <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2018-10-26HID: alps: allow incoming reports when only the trackstick is openedBenjamin Tissoires1-0/+18
If userspace only reads the trackstick node, and no one is listening to the touchpad nor the hidraw node then, the device is not powered on. Add open/close callbacks to allow users to disable the touchpad in Gnome while keeping the trackstick active. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1559632 Link: https://gitlab.gnome.org/GNOME/mutter/issues/128 Signed-off-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2018-10-26Revert "HID: add NOGET quirk for Eaton Ellipse MAX UPS"Benjamin Tissoires1-1/+0
This reverts commit 67ddbb3e6568fb1820b2cc45b00c50702b114801. 67ddbb3e656 ("HID: add NOGET quirk for Eaton Ellipse MAX UPS") was reported by Laurent Bigonville. It turns out that a later model Laurent got doesn't need the quirk after all. My take is that Eaton upgraded their firmwares, so we don't need it anymore. The old model was from 2012, so better make sure the new line works properly by removing the quirk. This allows upower to actually fetch the current data. Reported-by: Laurent Bigonville <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2018-10-26HID: i2c-hid: Add a small delay after sleep command for Raydium touchpanelKai-Heng Feng2-0/+22
Raydium touchpanel (2386:4B33) sometimes does not work in desktop session although it works in display manager. During user logging, the display manager exits, close the HID device, then the device gets runtime suspended and powered off. The desktop session begins shortly after, opens the HID device, then the device gets runtime resumed and powered on. If the trasition from display manager to desktop sesesion is fast, the touchpanel cannot switch from powered off to powered on in short timeframe. So add a small delay to workaround the issue. Signed-off-by: Kai-Heng Feng <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2018-10-26HID: hiddev: fix potential Spectre v1Breno Leitao1-4/+14
uref->usage_index can be indirectly controlled by userspace, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This field is used as an array index by the hiddev_ioctl_usage() function, when 'cmd' is either HIDIOCGCOLLECTIONINDEX, HIDIOCGUSAGES or HIDIOCSUSAGES. For cmd == HIDIOCGCOLLECTIONINDEX case, uref->usage_index is compared to field->maxusage and then used as an index to dereference field->usage array. The same thing happens to the cmd == HIDIOC{G,S}USAGES cases, where uref->usage_index is checked against an array maximum value and then it is used as an index in an array. This is a summary of the HIDIOCGCOLLECTIONINDEX case, which matches the traditional Spectre V1 first load: copy_from_user(uref, user_arg, sizeof(*uref)) if (uref->usage_index >= field->maxusage) goto inval; i = field->usage[uref->usage_index].collection_index; return i; This patch fixes this by sanitizing field uref->usage_index before using it to index field->usage (HIDIOCGCOLLECTIONINDEX) or field->value in HIDIOC{G,S}USAGES arrays, thus, avoiding speculation in the first load. Cc: <[email protected]> Signed-off-by: Breno Leitao <[email protected]> -- v2: Contemplate cmd == HIDIOC{G,S}USAGES case Signed-off-by: Jiri Kosina <[email protected]>
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 <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
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 <[email protected]> Fixes: 8341720642 ("HID: wacom: Queue events with missing type/serial data for later processing") Cc: [email protected] # v4.16+ Signed-off-by: Jiri Kosina <[email protected]>
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 <[email protected]> Fixes: eb1aac4c8744 ("HID: google: add support tablet mode switch for Whiskers") Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
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 <[email protected]>
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 <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
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 <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
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 <[email protected]> Signed-off-by: Marek Wyborski <[email protected]> Signed-off-by: Sean O'Brien <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
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 <[email protected]> Reported-and-tested-by: [email protected] Reported-and-tested-by: Bruno Jesus <[email protected]> Reported-and-tested-by: Dietrich <[email protected]> Reported-and-tested-by: [email protected] Signed-off-by: Julian Sax <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
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 <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
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 <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
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 <[email protected]> Reviewed-by: Andriy Shevchenko <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>