Highlights:
- 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
The following is an automated git shortlog grouped by driver:
ACPI:
- video: Fix acpi_video_handles_brightness_key_presses()
- video: Change how we determine if brightness key-presses are handled
Documentation/ABI:
- Add new attributes for mlxreg-io sysfs interfaces
- mlxreg-io: Fix contact info
Drop the PMC_ATOM Kconfig option:
- Drop the PMC_ATOM Kconfig option
EDAC, pnd2:
- convert to use common P2SB accessor
- Use proper I/O accessors and address space annotation
HID:
- surface-hid: Add support for hot-removal
ISST:
- PUNIT device mapping with Sub-NUMA clustering
Kconfig:
- Remove unnecessary "if X86"
MAINTAINERS:
- repair file entry in MICROSOFT SURFACE AGGREGATOR TABLET-MODE SWITCH
Merge tag 'ib-mfd-edac-i2c-leds-pinctrl-platform-watchdog-v5.20' into review-hans:
- Merge tag 'ib-mfd-edac-i2c-leds-pinctrl-platform-watchdog-v5.20' into review-hans
Move AMD platform drivers to separate directory:
- Move AMD platform drivers to separate directory
acer-wmi:
- Use backlight helper
acer_wmi:
- Cleanup Kconfig selects
apple-gmux:
- Use backlight helper
asus-wmi:
- Add mic-mute LED classdev support
- Add key mappings
compal-laptop:
- Use backlight helper
efi:
- Fix efi_power_off() not being run before acpi_power_off() when necessary
gigabyte-wmi:
- add support for B660I AORUS PRO DDR4
hp-wmi:
- Ignore Sanitization Mode event
i2c:
- i801: convert to use common P2SB accessor
ideapad-laptop:
- Add Ideapad 5 15ITL05 to ideapad_dytc_v4_allow_table[]
- Add allow_v4_dytc module parameter
intel/pmc:
- Add Alder Lake N support to PMC core driver
intel_atomisp2_led:
- Also turn off the always-on camera LED on the Asus T100TAF
leds:
- simatic-ipc-leds-gpio: Add GPIO version of Siemens driver
- simatic-ipc-leds: Convert to use P2SB accessor
mfd:
- lpc_ich: Add support for pinctrl in non-ACPI system
- lpc_ich: Switch to generic p2sb_bar()
- lpc_ich: Factor out lpc_ich_enable_spi_write()
mlx-platform:
- Add COME board revision register
- Add support for new system XH3000
- Introduce support for COMe NVSwitch management module for Vulcan chassis
- Add support for systems equipped with two ASICs
- Add cosmetic changes for alignment
- Make activation of some drivers conditional
p2sb:
- Move out of X86_PLATFORM_DEVICES dependency
panasonic-laptop:
- Use acpi_video_get_backlight_type()
- filter out duplicate volume up/down/mute keypresses
- don't report duplicate brightness key-presses
- revert "Resolve hotkey double trigger bug"
- sort includes alphabetically
- de-obfuscate button codes
pinctrl:
- intel: Check against matching data instead of ACPI companion
platform/mellanox:
- mlxreg-lc: Fix error flow and extend verbosity
- mlxreg-io: Add locking for io operations
- nvsw-sn2201: fix error code in nvsw_sn2201_create_static_devices()
platform/olpc:
- Fix uninitialized data in debugfs write
platform/surface:
- gpe: Add support for 13" Intel version of Surface Laptop 4
- tabletsw: Fix __le32 integer access
- Update copyright year of various drivers
- aggregator: Move subsystem hub drivers to their own module
- aggregator: Move device registry helper functions to core module
- aggregator_registry: Add support for tablet mode switch on Surface Laptop Studio
- aggregator_registry: Add support for tablet mode switch on Surface Pro 8
- Add KIP/POS tablet-mode switch driver
- aggregator: Add helper macros for requests with argument and return value
- aggregator: Reserve more event- and target-categories
- avoid flush_scheduled_work() usage
- aggregator_registry: Add support for keyboard cover on Surface Pro 8
- aggregator_registry: Add KIP device hub
- aggregator_registry: Change device ID for base hub
- aggregator_registry: Generify subsystem hub functionality
- aggregator: Add comment for KIP subsystem category
- aggregator_registry: Use client device wrappers for notifier registration
- aggregator: Allow notifiers to avoid communication on unregistering
- aggregator: Allow devices to be marked as hot-removed
- aggregator: Allow is_ssam_device() to be used when CONFIG_SURFACE_AGGREGATOR_BUS is disabled
platform/x86/amd/pmc:
- Add new platform support
- Add new acpi id for PMC controller
platform/x86/dell:
- Kconfig: Remove unnecessary "depends on X86_PLATFORM_DEVICES"
platform/x86/intel:
- Add Primary to Sideband (P2SB) bridge support
platform/x86/intel/ifs:
- Mark as BROKEN
platform/x86/intel/pmt:
- telemetry: Fix fixed region handling
platform/x86/intel/vsec:
- Fix wrong type for local status variables
- Add PCI error recovery support to Intel PMT
- Add support for Raptor Lake
- Rework early hardware code
pmc_atom:
- Fix comment typo
- Match all Lex BayTrail boards with critclk_systems DMI table
power/supply:
- surface_battery: Use client device wrappers for notifier registration
- surface_charger: Use client device wrappers for notifier registration
serial-multi-instantiate:
- Sort ACPI IDs by HID
- Get rid of redundant 'else'
- Use while (i--) pattern to clean up
- Improve dev_err_probe() messaging
- Drop duplicate check
- Improve autodetection
simatic-ipc:
- drop custom P2SB bar code
sony-laptop:
- Remove useless comparisons in sony_pic_read_possible_resource()
system76_acpi:
- Use dev_get_drvdata
thinkpad_acpi:
- Enable AMT by default on supported systems
- Add support for hotkey 0x131a
- Add support for automatic mode transitions
- profile capabilities as integer
- do not use PSC mode on Intel platforms
- Fix a memory leak of EFCH MMIO resource
- Replace custom str_on_off() etc
- Sort headers for better maintenance
- Use backlight helper
tools/power/x86/intel-speed-select:
- Remove unneeded semicolon
- Fix off by one check
watchdog:
- simatic-ipc-wdt: convert to use P2SB accessor
x86-android-tablets:
- Fix Lenovo Yoga Tablet 2 830/1050 poweroff again
-----BEGIN PGP SIGNATURE-----
iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmLrndEUHGhkZWdvZWRl
QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9zeMgf7BjSCz6ZA8SSY1i8QHDTvdjySihHJ
j07Gn3j1T/5G00R/r6viMDE4PxcYvMAPXjq3azepKQd8H5kGfE323SA6fgWFPAvi
P2OvEfvWfI5S8FYGYPBkNP2MjQ5MFe7qzLEh3+wQH0ocJ7WRCi457B4Xvtd2gWI3
dHj5gMSWC3O5xNa2S4Mg3dnD9uJlwhX+FNjWIuRy8eh5+DikgByyC4B+uW6WtO5e
t0rmIm6q5wUzB7dIetJLoAQwrcpYAOkK7L33G9h/7knWAfiJfklaKTbftnoxbDSv
iGWODkLDyob4C48DmVusS6WMEhPUzl/R33+tk6LjVt/YOYOP030EMtCECQ==
=Krhc
-----END PGP SIGNATURE-----
Merge tag 'platform-drivers-x86-v6.0-1' of 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
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIVAwUAYul6baZi849r7WBJAQLexhAAugWU2nqiJOAS/YDAoDdHVIdQR0dqHQ8K
ckJKyTQrsjPq0h1r0EmuH6kiJ3WoZi8iHssgQrffneewXiEhpdSGBQqEF72j+z2u
FuCk1rjLABu0f/WLkmDDN1a8CMhNj+dDuT3WDdUkWD8TMYWKa1tPb2oMKRZpnyqa
tdbjLbia7NCXN26znry95Rc/16JpwHpJ5EVxzkrcNQs7KunMK71CziPbW0CePw9o
9LQYIt7FhhnbtY2m+O4rkShct8ntAAaR4lUdR+GISXHkm7PfzBtpkA8Re97TQd0Y
qA6wYX4JhwVf9dJBmAbDvzRT10m/T4j3FbfQDeXVCaKEDxmXRZnMG2mCyhauYc9A
YzK48MLHY8vBiPc0Le0whiLWivj36kKfbXHCTLb5AcraPftNwnXEMv4ekuCyHVrv
2oLPtkbeLfNE5nks0k5M9K62XWebiaNmxzg5+rtCws0Z7YeuXLoRk7fbROj7iOh5
NTEZq3Ig/+4MNmafUhhOOhP76JxvKWi9tpw8kpAxAb+5vQJwtMyWu2k4tmNtwuwH
J6EScD+8/rbXfEromkHyp0ZJNW4QjJ4uta9ZSvvCEAyHoQ8cfTNfwh0mrtK80cZW
GfAFPsI/IgE6G9f97R7rqfsrE8qIjZ8EFLMcHM9QBYR42E8KuNpqxivALeO2VYUw
M+4wttJkwy4=
=Mv0b
-----END PGP SIGNATURE-----
Merge tag 'for-linus-2022080201' of 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
...
Add a check for num_hid_devices to handle special case the situation
of "no sensors".
Fixes: 4b2c53d93a ("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>
Add depended header file to fix error on i386 due to implicit
declaration of function ‘writeq’.
Fixes: 93ce5e0231 ("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>
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>
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>
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>
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: 2af16c1f84 ("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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
On removal of hid device during SFH set report may cause NULL pointer
exception. Hence add NULL check for hid device before accessing.
Fixes: 4b2c53d93a ("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>
Commit bebcc522fb ("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>
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>
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: 67a95c2146 ("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>
While the MAC address the uniq identifier is set to (cf. commit
1425247383 ("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>
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>
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>
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>
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>
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>
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>
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: 542134c037 ("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>
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>
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>
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: a228809fa6 ("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>
This commit extends fa33382c7f ("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>
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>
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 18eeef46d3 ("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>
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.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-----BEGIN PGP SIGNATURE-----
iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYpnZGw8cZ3JlZ0Brcm9h
aC5jb20ACgkQMUfUDdst+ymQhwCeLVANsQjBcL4ys4skl+1In17y28gAn3rEZ7rQ
Yv4uP9zadUqg3Cx0vjgf
=3s5s
-----END PGP SIGNATURE-----
Merge tag 'usb-5.19-rc1' of 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()
...
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: b5d7f43e97 ("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>
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>
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>