Age | Commit message (Collapse) | Author | Files | Lines |
|
Fix the uninitialized symbol 'rv' in the function ish_fw_xfer_direct_dma
to resolve the following warning from the smatch tool:
drivers/hid/intel-ish-hid/ishtp-fw-loader.c:714 ish_fw_xfer_direct_dma()
error: uninitialized symbol 'rv'.
Initialize 'rv' to 0 to prevent undefined behavior from uninitialized
access.
Cc: stable@vger.kernel.org
Fixes: 91b228107da3 ("HID: intel-ish-hid: ISH firmware loader client driver")
Signed-off-by: SurajSonawane2415 <surajsonawane0215@gmail.com>
Link: https://patch.msgid.link/20241004075944.44932-1-surajsonawane0215@gmail.com
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
With the introduction of commit e42ac1418055 ("bpf: Check unsupported ops
from the bpf_struct_ops's cfi_stubs"), a HID-BPF struct_ops containing
a .hid_hw_request() or a .hid_hw_output_report() was failing to load
as the cfi stubs were not defined.
Fix that by defining those simple static functions and restore HID-BPF
functionality.
This was detected with the HID selftests suddenly failing on Linus' tree.
Cc: stable@vger.kernel.org # v6.11+
Fixes: 9286675a2aed ("HID: bpf: add HID-BPF hooks for hid_hw_output_report")
Fixes: 8bd0488b5ea5 ("HID: bpf: add HID-BPF hooks for hid_hw_raw_requests")
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
|
Drop support for Devicetree from, because the binding is being reverted
(on basis of duplicating existing binding) and property was not added to
the original binding.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID updates from Jiri Kosina:
- New HID over SPI driver for Goodix devices that don't follow
Microsoft's HID-over-SPI specification, so a separate driver is
needed. Currently supported device is GT7986U touchscreen (Charles
Wang)
- support for new hardware features in Wacom driver (high-res wheel
scrolling, touchstrings with relative motions, support for two
touchrings) (Jason Gerecke)
- support for customized vendor firmware loading in intel-ish driver
(Zhang Lixu)
- fix for theoretical race condition in i2c-hid (Dmitry Torokhov)
- support for HIDIOCREVOKE -- evdev's EVIOCREVOKE equivalent in hidraw
(Peter Hutterer)
- initial hidraw selftest implementation (Benjamin Tissoires)
- constification of device-specific report descriptors (Thomas
Weißschuh)
- other small assorted fixes and device ID / quirk additions
* tag 'hid-for-linus-2024091602' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (54 commits)
hid: cp2112: Use irq_get_trigger_type() helper
HID: i2c-hid: ensure various commands do not interfere with each other
HID: multitouch: Add support for Thinkpad X12 Gen 2 Kbd Portfolio
HID: wacom: Do not warn about dropped packets for first packet
HID: wacom: Support sequence numbers smaller than 16-bit
HID: lg: constify fixed up report descriptor
HID: uclogic: constify fixed up report descriptor
HID: waltop: constify fixed up report descriptor
HID: sony: constify fixed up report descriptor
HID: pxrc: constify fixed up report descriptor
HID: steelseries: constify fixed up report descriptor
HID: viewsonic: constify fixed up report descriptor
HID: vrc2: constify fixed up report descriptor
HID: xiaomi: constify fixed up report descriptor
HID: maltron: constify fixed up report descriptor
HID: keytouch: constify fixed up report descriptor
HID: holtek-kbd: constify fixed up report descriptor
HID: dr: constify fixed up report descriptor
HID: bigbenff: constify fixed up report descriptor
HID: picoLCD: Use backlight power constants
...
|
|
- Use irq_get_trigger_type() helper (Jinjie Ruan)
|
|
Use irq_get_trigger_type() to replace irq_get_irq_data() and then
irqd_get_trigger_type(), if the irq data is NULL it will return 0.
No functional changed.
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240913074632.3779321-1-ruanjinjie@huawei.com
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
- Use backlight power constants (Thomas Zimmermann)
|
|
- Add support for one new Elan device (ekth6a12nay) (Zhaoxiong Lv)
|
|
- Enhance compatibility with clone controllers (Max Staudt)
|
|
- Add support for a new Goodix HID over SPI driver (Charles Wang)
Note: this driver doesn't rely on the spefication of HID over SPI
provided by Microsoft, thus needs a separate driver, not a generic bus
transport low level driver.
|
|
Various Wacom fixes (Jason Gerecke):
- Support for high-resolution wheel scrolling
- Support touchrings with relative motion
- Support devices with two touchrings
- Support sequence numbers smaller than 16-bit
|
|
- Convert comma to semicolon (Chen Ni)
|
|
- Add support for vendor customized firmware loading (Zhang Lixu)
|
|
- ensure various commands do not interfere with each other (Dmitry
Torokhov)
|
|
- introduction of HIDIOCREVOKE ioctl to revoke a hidraw fd opened by a
regular (non-root) application (Peter Hutterer)
|
|
- Constification of report descriptors so drivers can use read-only
memory when declaring report descriptors fixups (Thomas Weißschuh)
|
|
- add helper for finding a field with a certain usage (Kerem Karabay)
|
|
Small fixes for drivers/hid:
- Add support for 3 multitouch panels (He Lugang, tammy tseng and Vishnu
Sankar)
- Unused declarations cleanups (Yue Haibing)
- Fix comma vs semicolon (Chen Ni)
|
|
i2c-hid uses 2 shared buffers: command and "raw" input buffer for
sending requests to peripherals and read data from peripherals when
executing variety of commands. Such commands include reading of HID
registers, requesting particular power mode, getting and setting
reports and so on. Because all such requests use the same 2 buffers
they should not execute simultaneously.
Fix this by introducing "cmd_lock" mutex and acquire it whenever
we needs to access ihid->cmdbuf or idid->rawbuf.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
|
This applies similar quirks used by previous generation device, so that
Trackpoint and buttons on the touchpad works. New USB KBD PID 0x61AE for
Thinkpad X12 Tab is added.
Signed-off-by: Vishnu Sankar <vishnuocv@gmail.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
|
The driver currently assumes that the first sequence number it will see
is going to be 0. This is not a realiable assumption and can break if,
for example, the tablet has already been running for some time prior to
the kernel driver connecting to the device. This commit initializes the
expected sequence number to -1 and will only print the "Dropped" warning
the it has been updated to a non-negative value.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Tested-by: Joshua Dickens <joshua.dickens@wacom.com>
Fixes: 6d09085b38e5 ("HID: wacom: Adding Support for new usages")
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
|
The current dropped packet reporting assumes that all sequence numbers
are 16 bits in length. This results in misleading "Dropped" messages if
the hardware uses fewer bits. For example, if a tablet uses only 8 bits
to store its sequence number, once it rolls over from 255 -> 0, the
driver will still be expecting a packet "256". This patch adjusts the
logic to reset the next expected packet to logical_minimum whenever
it overflows beyond logical_maximum.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Tested-by: Joshua Dickens <joshua.dickens@wacom.com>
Fixes: 6d09085b38e5 ("HID: wacom: Adding Support for new usages")
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
|
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240905-hid-const-fixup-2-v2-1-70915e0cc1c7@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
Merge "hwmon fixes for v6.11-rc7" into review-hans to bring in
commit a54da9df75cd ("hwmon: (hp-wmi-sensors) Check if WMI event
data exists").
This is a dependency for a set of WMI event data refactoring changes.
|
|
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-14-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-12-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-11-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-10-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-9-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-8-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-7-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-6-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-5-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-4-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-3-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-2-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
Now that the HID core can handle const report descriptors,
constify them where possible.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-1-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
Replace FB_BLANK_ constants with their counterparts from the
backlight subsystem. The values are identical, so there's no
change in functionality or semantics.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
|
Replace a comma between expression statements by a semicolon.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
|
The patch is to add proper quirks for sis multitouch format
Signed-off-by: tammy tseng <tammy0524@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
|
The 2024 Lenovo Y9000P which use GT7868Q chip also needs a fixup.
The information of the chip is as follows:
I2C HID v1.00 Mouse [GXTP5100:00 27C6:01E0]
Signed-off-by: He Lugang <helugang@uniontech.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
|
Replace a comma between expression statements by a semicolon.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Acked-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
|
Elan-ekth6a12nay requires reset to pull down time greater than 10ms,
so the configuration post_power_delay_ms is 10, and the chipset
initial time is required to be greater than 300ms,
so the post_gpio_reset_on_delay_ms is set to 300.
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Zhaoxiong Lv <lvzhaoxiong@huaqin.corp-partner.google.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
|
The issue is GOODIX_HID_PKG_LEN_SIZE is defined as sizeof(u16) which is
type size_t. However, goodix_hid_check_ack_status() returns negative
error codes or potentially a positive but invalid length which is too
small. So when we compare "if ((response_data_len <=
GOODIX_HID_PKG_LEN_SIZE)" then negative error codes are type promoted to
size_t and counted as a positive large value and treated as valid.
It would have been easy enough to add some casting to avoid the type
promotion, however this patch takes a more thourough approach and moves
the length check into goodix_hid_check_ack_status(). Now the function
only return negative error codes or zero on success and the length
pointer is never set to an invalid length.
Fixes: 75e16c8ce283 ("HID: hid-goodix: Add Goodix HID-over-SPI driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
|
There is a need for userspace applications to open HID devices directly.
Use-cases include configuration of gaming mice or direct access to
joystick devices. The latter is currently handled by the uaccess tag in
systemd, other devices include more custom/local configurations or just
sudo.
A better approach is what we already have for evdev devices: give the
application a file descriptor and revoke it when it may no longer access
that device.
This patch is the hidraw equivalent to the EVIOCREVOKE ioctl, see
commit c7dc65737c9a ("Input: evdev - add EVIOCREVOKE ioctl") for full
details.
An MR for systemd-logind has been filed here:
https://github.com/systemd/systemd/pull/33970
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Link: https://patch.msgid.link/20240827-hidraw-revoke-v5-1-d004a7451aea@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
These structs are never modified, so mark them as const.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240804-hid-const-winwing-v1-1-5a6c714753b1@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
The HID core now allows static report descriptors to be read-only,
make use of it.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240803-hid-const-fixup-v2-7-f53d7a7b29d8@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
By allowing the drivers to return a "const *" they can constify their
static report arrays.
This makes it clear to driver authors that the HID core will not modify
those reports and they can be reused for multiple devices.
Furthermore security is slightly improved as those reports are protected
against accidental or malicious modifications.
[bentiss: fixup hid-cougar.c and hid-multitouch.c for latest version of
the master branch]
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240803-hid-const-fixup-v2-6-f53d7a7b29d8@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
fetch_item() does not modify the descriptor it operates on.
As a prerequisite for the constification of hid_driver::dev_rdesc,
mark the parameters and return value of fetch_item() as const.
Also adapt the variable types in the callers to match this
constification.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240803-hid-const-fixup-v2-4-f53d7a7b29d8@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|
|
The parameter is never modified, so mark it as const.
This is a prerequisite for constification changes in the HID core.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240803-hid-const-fixup-v2-2-f53d7a7b29d8@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
|