summaryrefslogtreecommitdiffstats
path: root/drivers/hid
AgeCommit message (Collapse)AuthorFilesLines
2022-08-04Merge tag 'platform-drivers-x86-v6.0-1' of ↵Linus Torvalds1-1/+37
git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Hans de Goede: - Microsoft Surface: - SSAM hot unplug support - Surface Pro 8 keyboard cover support - Tablet mode switch support for Surface Pro 8 and Surface Laptop Studio - thinkpad_acpi: - AMD Automatice Mode Transitions (AMT) support - Mellanox: - Vulcan chassis COMe NVSwitch management support - XH3000 support - New generic/shared Intel P2SB (Primary to Sideband) support - Lots of small cleanups - Various small bugfixes - Various new hardware ids / quirks additions * tag 'platform-drivers-x86-v6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (105 commits) platform/x86/intel/vsec: Fix wrong type for local status variables platform/x86: p2sb: Move out of X86_PLATFORM_DEVICES dependency platform/x86: pmc_atom: Fix comment typo platform/surface: gpe: Add support for 13" Intel version of Surface Laptop 4 platform/olpc: Fix uninitialized data in debugfs write platform/mellanox: mlxreg-lc: Fix error flow and extend verbosity platform/x86: pmc_atom: Match all Lex BayTrail boards with critclk_systems DMI table platform/x86: sony-laptop: Remove useless comparisons in sony_pic_read_possible_resource() tools/power/x86/intel-speed-select: Remove unneeded semicolon tools/power/x86/intel-speed-select: Fix off by one check platform/surface: tabletsw: Fix __le32 integer access Documentation/ABI: Add new attributes for mlxreg-io sysfs interfaces Documentation/ABI: mlxreg-io: Fix contact info platform/mellanox: mlxreg-io: Add locking for io operations platform/x86: mlx-platform: Add COME board revision register platform/x86: mlx-platform: Add support for new system XH3000 platform/x86: mlx-platform: Introduce support for COMe NVSwitch management module for Vulcan chassis platform/x86: mlx-platform: Add support for systems equipped with two ASICs platform/x86: mlx-platform: Add cosmetic changes for alignment platform/x86: mlx-platform: Make activation of some drivers conditional ...
2022-08-04Merge tag 'for-linus-2022080201' of ↵Linus Torvalds41-208/+2001
git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - support for AMD SOCs using SFH1.1 memory access (Basavaraj Natikar) - XP-PEN Deco L support (José Expósito) - support for Elan eKTH6915 touchscreens (Douglas Anderson) - other small assorted fixes and device ID additions * tag 'for-linus-2022080201' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (39 commits) HID: amd_sfh: Handle condition of "no sensors" HID: amd_sfh: Fix implicit declaration error on i386 HID: apple: Add "GANSS" to the non-Apple list HID: alps: Declare U1_UNICORN_LEGACY support HID: wacom: Force pen out of prox if no events have been received in a while HID: nintendo: Add missing array termination HID: lg-g15: Fix comment typo HID: amd_sfh: Implement SFH1.1 functionality HID: amd_sfh: Move interrupt handling to common interface HID: amd_sfh: Move amd_sfh_work to common interface HID: amd_sfh: Move global functions to static HID: amd_sfh: Add remove operation in amd_mp2_ops HID: amd_sfh: Add PM operations in amd_mp2_ops HID: amd_sfh: Add descriptor operations in amd_mp2_ops HID: amd_sfh: Move request_list variable to client data HID: amd_sfh: Move request_list struct to header file HID: amd_sfh: Move common macros and structures HID: amd_sfh: Add NULL check for hid device HID: core: remove unneeded assignment in hid_process_report() ID: intel-ish-hid: hid-client: drop unexpected word "the" in the comments ...
2022-08-02Merge branch 'for-5.20/uclogic' into for-linusJiri Kosina9-14/+581
- XP-PEN Deco L support (José Expósito)
2022-08-02Merge branch 'for-5.20/nintendo' into for-linusJiri Kosina1-0/+2
2022-08-02Merge branch 'for-5.20/elan' into for-linusJiri Kosina3-0/+146
- support for Elan eKTH6915 touchscreens (Douglas Anderson)
2022-08-02Merge branch 'for-5.20/core' into for-linusJiri Kosina1-1/+1
2022-08-02Merge branch 'for-5.20/apple' into for-linusJiri Kosina1-5/+30
2022-08-02Merge branch 'for-5.20/amd-sfh' into for-linusJiri Kosina14-143/+1103
- support for AMD SOCs using SFH1.1 memory access (Basavaraj Natikar)
2022-07-23HID: amd_sfh: Handle condition of "no sensors"Basavaraj Natikar1-0/+2
Add a check for num_hid_devices to handle special case the situation of "no sensors". Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)") Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-23HID: amd_sfh: Fix implicit declaration error on i386Basavaraj Natikar1-0/+2
Add depended header file to fix error on i386 due to implicit declaration of function ‘writeq’. Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality") Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-22HID: apple: Add "GANSS" to the non-Apple listHilton Chain1-1/+2
While using the name "SONiX USB DEVICE" for wired mode, my GANSS keyboard uses "GANSS" for bluetooth mode as well, so adding this to the list. Signed-off-by: Hilton Chain <hako@ultrarare.space> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-22HID: alps: Declare U1_UNICORN_LEGACY supportArtem Borisov1-0/+2
U1_UNICORN_LEGACY id was added to the driver, but was not declared in the device id table, making it impossible to use. Fixes: 640e403 ("HID: alps: Add AUI1657 device ID") Signed-off-by: Artem Borisov <dedsa2002@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: wacom: Force pen out of prox if no events have been received in a whileJason Gerecke3-0/+44
Prox-out events may not be reliably sent by some AES firmware. This can cause problems for users, particularly due to arbitration logic disabling touch input while the pen is in prox. This commit adds a timer which is reset every time a new prox event is received. When the timer expires we check to see if the pen is still in prox and force it out if necessary. This is patterend off of the same solution used by 'hid-letsketch' driver which has a similar problem. Link: https://github.com/linuxwacom/input-wacom/issues/310 Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: nintendo: Add missing array terminationGuenter Roeck1-0/+1
joycon_dpad_inputs_jc[] is unterminated. This may result in odd warnings such as input: input_set_capability: invalid code 3077588140 for type 1 or in kernel crashes in nintendo_hid_probe(). Terminate the array to fix the problem. Fixes: 2af16c1f846bd ("HID: nintendo: add nintendo switch controller driver") Cc: Daniel J. Ogorchock <djogorchock@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: lg-g15: Fix comment typoJason Wang1-1/+1
The double `with' is duplicated in line 769, remove one. Signed-off-by: Jason Wang <wangborong@cdjrlc.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: amd_sfh: Implement SFH1.1 functionalityBasavaraj Natikar8-0/+895
Newer AMD SOCs use SFH1.1 memory access with new PCI-id. Hence add new sfh1_1 sub directory to implement SFH1.1 functionality by defining new PCI id, interface functions, descriptor functions and handlers which invokes sfh1.1. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: amd_sfh: Move interrupt handling to common interfaceBasavaraj Natikar3-8/+10
Interrupt handling can be used in multiple files to support all AMD SOCs. Hence move interrupt handling to common interface. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: amd_sfh: Move amd_sfh_work to common interfaceBasavaraj Natikar2-2/+4
amd_sfh_work can be used in multiple files to support all AMD SOCs. Hence move amd_sfh_work to common interface. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: amd_sfh: Move global functions to staticBasavaraj Natikar3-12/+5
Move global functions declared from header files and make them as static functions wherever applicable. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: amd_sfh: Add remove operation in amd_mp2_opsBasavaraj Natikar2-1/+4
Add remove operation as part of amd_mp2_ops structure to support all AMD SOCs and use wherever applicable. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: amd_sfh: Add PM operations in amd_mp2_opsBasavaraj Natikar3-39/+58
Add PM operations as part of amd_mp2_ops structure to support all AMD SOCs and use wherever applicable. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: amd_sfh: Add descriptor operations in amd_mp2_opsBasavaraj Natikar7-25/+42
Add dynamic descriptor operations as part of amd_mp2_ops structure to support all AMD SOCs and use wherever applicable. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: amd_sfh: Move request_list variable to client dataBasavaraj Natikar2-5/+8
request_list variable can be used in multiple files to support all AMD SOCs. Hence move request_list variable to client data. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: amd_sfh: Move request_list struct to header fileBasavaraj Natikar2-10/+9
request_list structure can be used in multiple files to support all AMD SOCs. Hence move request_list structure to header file. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: amd_sfh: Move common macros and structuresBasavaraj Natikar2-41/+60
Introduce common macros and structures to support multiple generations of AMD SOCs, move them to amd_sfh_common.h. Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: amd_sfh: Add NULL check for hid deviceBasavaraj Natikar1-4/+8
On removal of hid device during SFH set report may cause NULL pointer exception. Hence add NULL check for hid device before accessing. Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)") Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: core: remove unneeded assignment in hid_process_report()Lukas Bulwahn1-1/+1
Commit bebcc522fbee ("HID: core: for input reports, process the usages by priority list") split the iteration into two distinct loops in hid_process_report(). After this change, the variable field is only used while iterating in the second loop and the assignment of values to this variable in the first loop is simply not needed. Remove the unneeded assignment during retrieval. No functional change and no change in the resulting object code. This was discovered as a dead store with clang-analyzer. Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Reviewed-by: Tom Rix <trix@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21ID: intel-ish-hid: hid-client: drop unexpected word "the" in the commentsJiang Jian1-1/+1
there is an unexpected word "the" in the comments that need to be dropped file: drivers/hid/intel-ish-hid/ishtp-hid-client.c line: 331 * @device: Pointer to the the ishtp client device for which this message changed to * @device: Pointer to the ishtp client device for which this message Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-07-21HID: mcp2221: prevent a buffer overflow in mcp_smbus_write()Harshit Mogalapalli1-0/+3
Smatch Warning: drivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy() '&mcp->txbuf[5]' too small (59 vs 255) drivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy() 'buf' too small (34 vs 255) The 'len' variable can take a value between 0-255 as it can come from data->block[0] and it is user data. So add an bound check to prevent a buffer overflow in memcpy(). Fixes: 67a95c21463d ("HID: mcp2221: add usb to i2c-smbus host bridge") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-15HID: nintendo: Set phys property of input device based on HID physThomas Schneider1-0/+2
While the MAC address the uniq identifier is set to (cf. commit 1425247383c5 ("HID: nintendo: set controller uniq to MAC")) is certainly unique, the physical location can be more helpful in user interfaces. The underlying hid_device already provides a suitable value, so we can simply reuse this here. Signed-off-by: Thomas Schneider <qsx@chaotikum.eu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-15HID: uclogic: Add support for XP-PEN Deco LJosé Expósito5-0/+310
The XP-PEN Deco L (UGEE) needs to be initialized by sending a buffer of magic data, discovered by sniffing the Windows driver traffic. In order to differentiate UGEE tablets that need this kind of initialization from the previous ones, name them v2 internally and create an entry point for them. After initialization, the template report descriptors can be discovered by parsing a string descriptor, similar to the one exposed by HUION v1 devices. Add all the required elements to support the device. Signed-off-by: José Expósito <jose.exposito89@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-15HID: uclogic: Allow to generate frame templatesJosé Expósito3-3/+53
Add a new template placeholder to allow configuring the number of buttons in the drawing tablet frame and update the KUnit tests to cover the new case. Signed-off-by: José Expósito <jose.exposito89@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-15HID: uclogic: Add KUnit tests for uclogic_rdesc_template_apply()José Expósito4-0/+207
The uclogic_rdesc_template_apply() function is used by the driver to generate HID descriptors from templates. In order to avoid regressions in future patches, add KUnit tests to test the function. To run the tests: $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/hid \ --kconfig_add CONFIG_VIRTIO_UML=y \ --kconfig_add CONFIG_UML_PCI_OVER_VIRTIO=y Signed-off-by: José Expósito <jose.exposito89@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-15HID: uclogic: Make template placeholder IDs genericJosé Expósito3-14/+14
Up until now, the report descriptor template parameter IDs were only used with pen report descriptors and they were named accordingly. Rename the enum and the total number of IDs to make them interface agnostic. Refactor, no functional changes. Signed-off-by: José Expósito <jose.exposito89@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-13HID: surface-hid: Add support for hot-removalMaximilian Luz1-1/+37
Add support for hot-removal of SSAM HID client devices. Once a device has been hot-removed, further communication with it should be avoided as it may fail and time out. While the device will be removed as soon as we detect hot-removal, communication may still occur during teardown, especially when unregistering notifiers. While hot-removal is a surprise event that can happen at any time, try to avoid communication as much as possible once it has been detected to prevent timeouts that can slow down device removal and cause issues, e.g. when quickly re-attaching the device. Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20220527023447.2460025-8-luzmaximilian@gmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2022-06-09HID: multitouch: new device class fix Lenovo X12 trackpad stickyTao Jin1-1/+12
The trackpad of the given device sends continuous report of pointers status as per wxn8 spec. However, the spec did not clarify when the fingers are lifted so fast that between the interval of two report frames fingers on pad reduced from >=2 to 0. The second last report contains >=2 fingers with tip state 1 and the last report contains only 1 finger with tip state 0. Although this can happen unfrequently, a quick fix will be improve the consistency to 100%. A quick fix is to disable MT_QUIRK_ALWAYS_VALID and enable MT_QUIRK_NOT_SEEN_MEANS_UP. Test for hid-tools is added in [1] In addition to this, I2C device 04CA:00B1 may also need similar class but with MT_QUIRK_FORCE_MULTI_INPUT disabled (but it does not harm to enable it on non-multi-input device either). The respective owner has been notified and a patch may coming soon after test. [1]: https://gitlab.freedesktop.org/libevdev/hid-tools/-/merge_requests/130 Signed-off-by: Tao Jin <tao-j@outlook.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-09HID: cp2112: prevent a buffer overflow in cp2112_xfer()Harshit Mogalapalli1-0/+5
Smatch warnings: drivers/hid/hid-cp2112.c:793 cp2112_xfer() error: __memcpy() 'data->block[1]' too small (33 vs 255) drivers/hid/hid-cp2112.c:793 cp2112_xfer() error: __memcpy() 'buf' too small (64 vs 255) The 'read_length' variable is provided by 'data->block[0]' which comes from user and it(read_length) can take a value between 0-255. Add an upper bound to 'read_length' variable to prevent a buffer overflow in memcpy(). Fixes: 542134c0375b ("HID: cp2112: Fix I2C_BLOCK_DATA transactions") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-08HID: hyperv: Correctly access fields declared as __le16Michael Kelley1-2/+3
Add the use of le16_to_cpu() for fields declared as __le16. Because Hyper-V only runs in Little Endian mode, there's no actual bug. The change is made in the interest of general correctness in addition to making sparse happy. No functional change. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Michael Kelley <mikelley@microsoft.com> Link: https://lore.kernel.org/r/1654660177-115463-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
2022-06-08HID: hid-input: add Surface Go battery quirkMaximilian Luz2-0/+3
Similar to the Surface Go (1), the (Elantech) touchscreen/digitizer in the Surface Go 2 mistakenly reports the battery of the stylus. Instead of over the touchscreen device, battery information is provided via bluetooth and the touchscreen device reports an empty battery. Apply the HID_BATTERY_QUIRK_IGNORE quirk to ignore this battery and prevent the erroneous low battery warnings. Cc: stable@vger.kernel.org Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-08HID: intel-ish-hid: ipc: use time_before to replace "jiffies < a"Li Qiong1-1/+1
time_before deals with timer wrapping correctly. Signed-off-by: Li Qiong <liqiong@nfschina.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-08HID: logitech-hidpp: Fix syntax errors in commentsXiang wangx1-1/+1
Delete the redundant word 'in'. Signed-off-by: Xiang wangx <wangxiang@cdjrlc.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-08HID: uclogic: properly format kernel-doc comment for hid_dbg() wrappersBagas Sanjaya1-10/+14
Running kernel-doc script on drivers/hid/hid-uclogic-params.c, it found 6 warnings for hid_dbg() wrapper functions below: drivers/hid/hid-uclogic-params.c:48: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Dump tablet interface pen parameters with hid_dbg(), indented with one tab. drivers/hid/hid-uclogic-params.c:48: warning: missing initial short description on line: * Dump tablet interface pen parameters with hid_dbg(), indented with one tab. drivers/hid/hid-uclogic-params.c:48: info: Scanning doc for function Dump drivers/hid/hid-uclogic-params.c:80: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Dump tablet interface frame parameters with hid_dbg(), indented with two drivers/hid/hid-uclogic-params.c:80: warning: missing initial short description on line: * Dump tablet interface frame parameters with hid_dbg(), indented with two drivers/hid/hid-uclogic-params.c:80: info: Scanning doc for function Dump drivers/hid/hid-uclogic-params.c:105: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Dump tablet interface parameters with hid_dbg(). drivers/hid/hid-uclogic-params.c:105: warning: missing initial short description on line: * Dump tablet interface parameters with hid_dbg(). One of them is reported by kernel test robot. Fix these warnings by properly format kernel-doc comment for these functions. Link: https://lore.kernel.org/linux-doc/202205272033.XFYlYj8k-lkp@intel.com/ Fixes: a228809fa6f39c ("HID: uclogic: Move param printing to a function") Reported-by: kernel test robot <lkp@intel.com> Tested-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: José Expósito <jose.exposito89@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Cc: Nikolai Kondrashov <spbnick@gmail.com> Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: llvm@lists.linux.dev Cc: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-08HID: apple: Properly handle function keys on non-Apple keyboardHilton Chain1-5/+29
This commit extends fa33382c7f74 ("HID: apple: Properly handle function keys on Keychron keyboards") by adding an array of known non-Apple keyboards' device names, and the function apple_is_non_apple_keyboard() to identify and create exception for them. Signed-off-by: Hilton Chain <hako@ultrarare.space> Reviewed-by: Bryan Cain <bryancain3@gmail.com> Tested-by: Bryan Cain <bryancain3@gmail.com> Reviewed-by: José Expósito <jose.exposito89@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-08HID: nintendo: fix unused const warningDaniel J. Ogorchock1-2/+1
JC_RUMBLE_ZERO_AMP_PKT_CNT is only used when force feedback support in the driver is enabled. Place the declaration in the CONFIG_NINTENDO_FF ifdef to avoid a warning when compiling without rumble support. Signed-off-by: Daniel J. Ogorchock <djogorchock@gmail.com> Reviewed-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-08HID: i2c-hid: elan: Add support for Elan eKTH6915 i2c-hid touchscreensDouglas Anderson3-0/+146
Like many i2c-hid touchscreen controllers, the Elan eKTH6915 has a reset GPIO hooked up to it. According to the datasheet, the way we're supposed to turn the touchscreen on is: 1. Turn on the 3.3V supply. 2. Turn on the IO supply. It's OK if this is hardwired to the 3.3V supply, but if it's not then it must be turned on _after_ the 3.3V supply. 3. Wait >= 1 ms. 4. Deassert the reset GPIO (reset GPIO is active low, so there would be a leakage path if this was deasserted _before_ the IO supply). 5. Wait 300 ms. Much of the above can be handled by the generic i2c-hid-of driver, but the "reset" GPIO is not supported by that driver. Thus we'll do the same as we did for Goodix and add a new tiny driver that uses the i2c-hid core. NOTE: support for this new touchscreen could theorically fit into the Goodix driver. I've made it a separate driver because the Elan driver supports _two_ regulators and it's unclear exactly how that would fit in with commit 18eeef46d359 ("HID: i2c-hid: goodix: Tie the reset line to true state of the regulator"). Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-06-03Merge tag 'usb-5.19-rc1' of ↵Linus Torvalds3-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt updates from Greg KH: "Here is the "big" set of USB and Thunderbolt driver changes for 5.18-rc1. For the most part it's been a quiet development cycle for the USB core, but there are the usual "hot spots" of development activity. Included in here are: - Thunderbolt driver updates: - fixes for devices without displayport adapters - lane bonding support and improvements - other minor changes based on device testing - dwc3 gadget driver changes. It seems this driver will never be finished given that the IP core is showing up in zillions of new devices and each implementation decides to do something different with it... - uvc gadget driver updates as more devices start to use and rely on this hardware as well - usb_maxpacket() api changes to remove an unneeded and unused parameter. - usb-serial driver device id updates and small cleanups - typec cleanups and fixes based on device testing - device tree updates for usb properties - lots of other small fixes and driver updates. All of these have been in linux-next for weeks with no reported problems" * tag 'usb-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (154 commits) USB: new quirk for Dell Gen 2 devices usb: dwc3: core: Add error log when core soft reset failed usb: dwc3: gadget: Move null pinter check to proper place usb: hub: Simplify error and success path in port_over_current_notify usb: cdns3: allocate TX FIFO size according to composite EP number usb: dwc3: Fix ep0 handling when getting reset while doing control transfer usb: Probe EHCI, OHCI controllers asynchronously usb: isp1760: Fix out-of-bounds array access xhci: Don't defer primary roothub registration if there is only one roothub USB: serial: option: add Quectel BG95 modem USB: serial: pl2303: fix type detection for odd device xhci: Allow host runtime PM as default for Intel Alder Lake N xHCI xhci: Remove quirk for over 10 year old evaluation hardware xhci: prevent U2 link power state if Intel tier policy prevented U1 xhci: use generic command timer for stop endpoint commands. usb: host: xhci-plat: omit shared hcd if either root hub has no ports usb: host: xhci-plat: prepare operation w/o shared hcd usb: host: xhci-plat: create shared hcd after having added main hcd xhci: prepare for operation w/o shared hcd xhci: factor out parts of xhci_gen_setup() ...
2022-05-27HID: amd_sfh: Don't show client init failed as error when discovery failsMario Limonciello1-1/+2
When sensor discovery fails, this means that the system doesn't have any sensors connected and a user should only be notified at most one time. A message is already displayed at WARN level of "failed to discover, sensors not enabled". It's pointless to show that the client init failed at ERR level for the same condition. Check the return code and don't display this message in those conditions. Fixes: b5d7f43e97da ("HID: amd_sfh: Add support for sensor discovery") Reported-by: David Chang <David.Chang@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-05-27HID: wacom: Don't register pad_input for touch switchPing Cheng2-19/+26
Touch switch state is received through WACOM_PAD_FIELD. However, it is reported by touch_input. Don't register pad_input if no other pad events require the interface. Cc: stable@vger.kernel.org Signed-off-by: Ping Cheng <ping.cheng@wacom.com> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-05-27HID: wacom: Only report rotation for art penPing Cheng1-8/+21
The generic routine, wacom_wac_pen_event, turns rotation value 90 degree anti-clockwise before posting the events. This non-zero event trggers a non-zero ABS_Z event for non art pen tools. However, HID_DG_TWIST is only supported by art pen. [jkosina@suse.cz: fix build: add missing brace] Cc: stable@vger.kernel.org Signed-off-by: Ping Cheng <ping.cheng@wacom.com> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> -- Hi Jiri, This is kind of a version 2 of the last one I posted two days ago. I updated the logic so it has less changed lines: 29 vs 158! Hopefully, the logic is easier to follow now. Please ignore the last one. Thank you! Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-05-25Merge tag 'drm-next-2022-05-25' of git://anongit.freedesktop.org/drm/drmLinus Torvalds1-1/+2
Pull drm updates from Dave Airlie: "Intel have enabled DG2 on certain SKUs for laptops, AMD has started some new GPU support, msm has user allocated VA controls dma-buf: - add dma_resv_replace_fences - add dma_resv_get_singleton - make dma_excl_fence private core: - EDID parser refactorings - switch drivers to drm_mode_copy/duplicate - DRM managed mutex initialization display-helper: - put HDMI, SCDC, HDCP, DSC and DP into new module gem: - rework fence handling ttm: - rework bulk move handling - add common debugfs for resource managers - convert to kvcalloc format helpers: - support monochrome formats - RGB888, RGB565 to XRGB8888 conversions fbdev: - cfb/sys_imageblit fixes - pagelist corruption fix - create offb platform device - deferred io improvements sysfb: - Kconfig rework - support for VESA mode selection bridge: - conversions to devm_drm_of_get_bridge - conversions to panel_bridge - analogix_dp - autosuspend support - it66121 - audio support - tc358767 - DSI to DPI support - icn6211 - PLL/I2C fixes, DT property - adv7611 - enable DRM_BRIDGE_OP_HPD - anx7625 - fill ELD if no monitor - dw_hdmi - add audio support - lontium LT9211 support, i.MXMP LDB - it6505: Kconfig fix, DPCD set power fix - adv7511 - CEC support for ADV7535 panel: - ltk035c5444t, B133UAN01, NV3052C panel support - DataImage FG040346DSSWBG04 support - st7735r - DT bindings fix - ssd130x - fixes i915: - DG2 laptop PCI-IDs ("motherboard down") - Initial RPL-P PCI IDs - compute engine ABI - DG2 Tile4 support - DG2 CCS clear color compression support - DG2 render/media compression formats support - ATS-M platform info - RPL-S PCI IDs added - Bump ADL-P DMC version to v2.16 - Support static DRRS - Support multiple eDP/LVDS native mode refresh rates - DP HDR support for HSW+ - Lots of display refactoring + fixes - GuC hwconfig support and query - sysfs support for multi-tile - fdinfo per-client gpu utilisation - add geometry subslices query - fix prime mmap with LMEM - fix vm open count and remove vma refcounts - contiguous allocation fixes - steered register write support - small PCI BAR enablement - GuC error capture support - sunset igpu legacy mmap support for newer devices - GuC version 70.1.1 support amdgpu: - Initial SoC21 support - SMU 13.x enablement - SMU 13.0.4 support - ttm_eu cleanups - USB-C, GPUVM updates - TMZ fixes for RV - RAS support for VCN - PM sysfs code cleanup - DC FP rework - extend CG/PG flags to 64-bit - SI dpm lockdep fix - runtime PM fixes amdkfd: - RAS/SVM fixes - TLB flush fixes - CRIU GWS support - ignore bogus MEC signals more efficiently msm: - Fourcc modifier for tiled but not compressed layouts - Support for userspace allocated IOVA (GPU virtual address) - DPU: DSC (Display Stream Compression) support - DP: eDP support - DP: conversion to use drm_bridge and drm_bridge_connector - Merge DPU1 and MDP5 MDSS driver - DPU: writeback support nouveau: - make some structures static - make some variables static - switch to drm_gem_plane_helper_prepare_fb radeon: - misc fixes/cleanups mxsfb: - rework crtc mode setting - LCDIF CRC support etnaviv: - fencing improvements - fix address space collisions - cleanup MMU reference handling gma500: - GEM/GTT improvements - connector handling fixes komeda: - switch to plane reset helper mediatek: - MIPI DSI improvements omapdrm: - GEM improvements qxl: - aarch64 support vc4: - add a CL submission tracepoint - HDMI YUV support - HDMI/clock improvements - drop is_hdmi caching virtio: - remove restriction of non-zero blob types vmwgfx: - support for cursormob and cursorbypass 4 - fence improvements tidss: - reset DISPC on startup solomon: - SPI support - DT improvements sun4i: - allwinner D1 support - drop is_hdmi caching imx: - use swap() instead of open-coding - use devm_platform_ioremap_resource - remove redunant initializations ast: - Displayport support rockchip: - Refactor IOMMU initialisation - make some structures static - replace drm_detect_hdmi_monitor with drm_display_info.is_hdmi - support swapped YUV formats, - clock improvements - rk3568 support - VOP2 support mediatek: - MT8186 support tegra: - debugabillity improvements" * tag 'drm-next-2022-05-25' of git://anongit.freedesktop.org/drm/drm: (1740 commits) drm/i915/dsi: fix VBT send packet port selection for ICL+ drm/i915/uc: Fix undefined behavior due to shift overflowing the constant drm/i915/reg: fix undefined behavior due to shift overflowing the constant drm/i915/gt: Fix use of static in macro mismatch drm/i915/audio: fix audio code enable/disable pipe logging drm/i915: Fix CFI violation with show_dynamic_id() drm/i915: Fix 'mixing different enum types' warnings in intel_display_power.c drm/i915/gt: Fix build error without CONFIG_PM drm/msm/dpu: handle pm_runtime_get_sync() errors in bind path drm/msm/dpu: add DRM_MODE_ROTATE_180 back to supported rotations drm/msm: don't free the IRQ if it was not requested drm/msm/dpu: limit writeback modes according to max_linewidth drm/amd: Don't reset dGPUs if the system is going to s2idle drm/amdgpu: Unmap legacy queue when MES is enabled drm: msm: fix possible memory leak in mdp5_crtc_cursor_set() drm/msm: Fix fb plane offset calculation drm/msm/a6xx: Fix refcount leak in a6xx_gpu_init drm/msm/dsi: don't powerup at modeset time for parade-ps8640 drm/rockchip: Change register space names in vop2 dt-bindings: display: rockchip: make reg-names mandatory for VOP2 ...