Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10, v6.6.9 |
|
#
7e062c08 |
| 23-Dec-2023 |
Mikhail Khvainitski <me@khvoinitsky.org> |
HID: lenovo: Add middleclick_workaround sysfs knob for cptkbd
[ Upstream commit 2814646f76f8518326964f12ff20aaee70ba154d ]
Previous attempt to autodetect well-behaving patched firmware introduced i
HID: lenovo: Add middleclick_workaround sysfs knob for cptkbd
[ Upstream commit 2814646f76f8518326964f12ff20aaee70ba154d ]
Previous attempt to autodetect well-behaving patched firmware introduced in commit 46a0a2c96f0f ("HID: lenovo: Detect quirk-free fw on cptkbd and stop applying workaround") has shown that there are false-positives on original firmware (on both 1st gen and 2nd gen keyboards) which causes the middle button click workaround to be mistakenly disabled.
This commit adds explicit parameter to sysfs to control this workaround.
Fixes: 46a0a2c96f0f ("HID: lenovo: Detect quirk-free fw on cptkbd and stop applying workaround") Fixes: 43527a0094c1 ("HID: lenovo: Restrict detection of patched firmware only to USB cptkbd") Signed-off-by: Mikhail Khvainitski <me@khvoinitsky.org> Signed-off-by: Jiri Kosina <jkosina@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.8, v6.6.7 |
|
#
b89b7c76 |
| 12-Dec-2023 |
Mikhail Khvainitski <me@khvoinitsky.org> |
HID: lenovo: Restrict detection of patched firmware only to USB cptkbd
[ Upstream commit 43527a0094c10dfbf0d5a2e7979395a38de3ff65 ]
Commit 46a0a2c96f0f ("HID: lenovo: Detect quirk-free fw on cptkbd
HID: lenovo: Restrict detection of patched firmware only to USB cptkbd
[ Upstream commit 43527a0094c10dfbf0d5a2e7979395a38de3ff65 ]
Commit 46a0a2c96f0f ("HID: lenovo: Detect quirk-free fw on cptkbd and stop applying workaround") introduced a regression for ThinkPad TrackPoint Keyboard II which has similar quirks to cptkbd (so it uses the same workarounds) but slightly different so that there are false-positives during detecting well-behaving firmware. This commit restricts detecting well-behaving firmware to the only model which known to have one and have stable enough quirks to not cause false-positives.
Fixes: 46a0a2c96f0f ("HID: lenovo: Detect quirk-free fw on cptkbd and stop applying workaround") Link: https://lore.kernel.org/linux-input/ZXRiiPsBKNasioqH@jekhomev/ Link: https://bbs.archlinux.org/viewtopic.php?pid=2135468#p2135468 Signed-off-by: Mikhail Khvainitski <me@khvoinitsky.org> Tested-by: Yauhen Kharuzhy <jekhor@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.6, v6.6.5, v6.6.4, v6.6.3, v6.6.2, v6.5.11, v6.6.1, v6.5.10, v6.6, v6.5.9, v6.5.8, v6.5.7, v6.5.6 |
|
#
465b5572 |
| 02-Oct-2023 |
Jamie Lentin <jm@lentin.co.uk> |
hid: lenovo: Resend all settings on reset_resume for compact keyboards
commit 2f2bd7cbd1d1548137b351040dc4e037d18cdfdc upstream.
The USB Compact Keyboard variant requires a reset_resume function to
hid: lenovo: Resend all settings on reset_resume for compact keyboards
commit 2f2bd7cbd1d1548137b351040dc4e037d18cdfdc upstream.
The USB Compact Keyboard variant requires a reset_resume function to restore keyboard configuration after a suspend in some situations. Move configuration normally done on probe to lenovo_features_set_cptkbd(), then recycle this for use on reset_resume.
Without, the keyboard and driver would end up in an inconsistent state, breaking middle-button scrolling amongst other problems, and twiddling sysfs values wouldn't help as the middle-button mode won't be set until the driver is reloaded.
Tested on a USB and Bluetooth Thinkpad Compact Keyboard.
CC: stable@vger.kernel.org Fixes: 94eefa271323 ("HID: lenovo: Use native middle-button mode for compact keyboards") Signed-off-by: Jamie Lentin <jm@lentin.co.uk> Signed-off-by: Martin Kepplinger <martink@posteo.de> Link: https://lore.kernel.org/r/20231002150914.22101-1-martink@posteo.de Signed-off-by: Benjamin Tissoires <bentiss@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
69f2af4d |
| 23-Sep-2023 |
Mikhail Khvainitski <me@khvoinitsky.org> |
HID: lenovo: Detect quirk-free fw on cptkbd and stop applying workaround
[ Upstream commit 46a0a2c96f0f47628190f122c2e3d879e590bcbe ]
Built-in firmware of cptkbd handles scrolling by itself (when m
HID: lenovo: Detect quirk-free fw on cptkbd and stop applying workaround
[ Upstream commit 46a0a2c96f0f47628190f122c2e3d879e590bcbe ]
Built-in firmware of cptkbd handles scrolling by itself (when middle button is pressed) but with issues: it does not support horizontal and hi-res scrolling and upon middle button release it sends middle button click even if there was a scrolling event. Commit 3cb5ff0220e3 ("HID: lenovo: Hide middle-button press until release") workarounds last issue but it's impossible to workaround scrolling-related issues without firmware modification.
Likely, Dennis Schneider has reverse engineered the firmware and provided an instruction on how to patch it [1]. However, aforementioned workaround prevents userspace (libinput) from knowing exact moment when middle button has been pressed down and performing "On-Button scrolling". This commit detects correctly-behaving patched firmware if cursor movement events has been received during middle button being pressed and stops applying workaround for this device.
Link: https://hohlerde.org/rauch/en/elektronik/projekte/tpkbd-fix/ [1]
Signed-off-by: Mikhail Khvainitski <me@khvoinitsky.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.5.5, v6.5.4, v6.5.3, v6.5.2, v6.1.51, v6.5.1, v6.1.50, v6.5, v6.1.49, v6.1.48, v6.1.46, v6.1.45, v6.1.44, v6.1.43, v6.1.42, v6.1.41, v6.1.40, v6.1.39, v6.1.38, v6.1.37, v6.1.36, v6.4, v6.1.35, v6.1.34, v6.1.33, v6.1.32, v6.1.31, v6.1.30, v6.1.29, v6.1.28, v6.1.27, v6.1.26, v6.3, v6.1.25, v6.1.24, v6.1.23, v6.1.22, v6.1.21, v6.1.20, v6.1.19, v6.1.18, v6.1.17, v6.1.16, v6.1.15, v6.1.14, v6.1.13, v6.2, v6.1.12, v6.1.11, v6.1.10, v6.1.9, v6.1.8, v6.1.7, v6.1.6, v6.1.5, v6.0.19, v6.0.18, v6.1.4, v6.1.3, v6.0.17, v6.1.2, v6.0.16, v6.1.1, v6.0.15, v6.0.14, v6.0.13, v6.1, v6.0.12, v6.0.11, v6.0.10, v5.15.80, v6.0.9, v5.15.79, v6.0.8, v5.15.78, v6.0.7, v5.15.77, v5.15.76, v6.0.6, v6.0.5, v5.15.75, v6.0.4, v6.0.3, v6.0.2, v5.15.74, v5.15.73, v6.0.1 |
|
#
e66928af |
| 05-Oct-2022 |
Colin Ian King <colin.i.king@gmail.com> |
HID: lenovo: Make array tp10ubkbd_led static const
Don't populate the read-only array tp10ubkbd_led on the stack but instead make it static const. Also makes the object code a little smaller.
Signe
HID: lenovo: Make array tp10ubkbd_led static const
Don't populate the read-only array tp10ubkbd_led on the stack but instead make it static const. Also makes the object code a little smaller.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
Revision tags: v5.15.72, v6.0, v5.15.71, v5.15.70, v5.15.69, v5.15.68, v5.15.67, v5.15.66, v5.15.65, v5.15.64, v5.15.63, v5.15.62, v5.15.61, v5.15.60, v5.15.59, v5.19, v5.15.58, v5.15.57, v5.15.56, v5.15.55, v5.15.54, v5.15.53, v5.15.52, v5.15.51, v5.15.50, v5.15.49, v5.15.48, v5.15.47, v5.15.46, v5.15.45, v5.15.44, v5.15.43, v5.15.42, v5.18, v5.15.41, v5.15.40, v5.15.39, v5.15.38, v5.15.37, v5.15.36, v5.15.35, v5.15.34, v5.15.33, v5.15.32, v5.15.31, v5.17, v5.15.30, v5.15.29, v5.15.28, v5.15.27, v5.15.26, v5.15.25, v5.15.24 |
|
#
5c9b8fae |
| 13-Feb-2022 |
ValdikSS <iam@valdikss.org.ru> |
HID: lenovo: Add note about different report numbers
Signed-off-by: Florian Klink <flokli@flokli.de> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosi
HID: lenovo: Add note about different report numbers
Signed-off-by: Florian Klink <flokli@flokli.de> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
#
a0a5c2a6 |
| 13-Feb-2022 |
ValdikSS <iam@valdikss.org.ru> |
HID: lenovo: Sync Fn-lock state on button press for Compact and TrackPoint II keyboards
When Fn-Esc is pressed on the keyboard, it emits the scancode which could be used to sync the fn_lock sysfs st
HID: lenovo: Sync Fn-lock state on button press for Compact and TrackPoint II keyboards
When Fn-Esc is pressed on the keyboard, it emits the scancode which could be used to sync the fn_lock sysfs state.
Previously fn_lock only allowed to set new Fn-lock state and did not keep the value in sync upon Fn-Esc press, which is now fixed.
Signed-off-by: Florian Klink <flokli@flokli.de> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
#
24401f29 |
| 13-Feb-2022 |
ValdikSS <iam@valdikss.org.ru> |
HID: lenovo: Add support for ThinkPad TrackPoint Keyboard II
This keyboard has two modes: regular HID and a native mode, which is used in Windows driver. Native mode disables (poor) middle mouse but
HID: lenovo: Add support for ThinkPad TrackPoint Keyboard II
This keyboard has two modes: regular HID and a native mode, which is used in Windows driver. Native mode disables (poor) middle mouse button scrolling emulation and reports middle button and scrolling events with a custom report ID, which could be better handled in the driver.
This commit adds functional button mapping and native scrolling support.
HID collection in Bluetooth mode for custom report ID=5 is broken and is patched upon connection. The collection initially contains incorrect Usage Minimum/Usage Maximum numbers and, more importantly, marks Input as Variable, not Array, while reporting values as in Array.
The keyboard is very similar to Compact USB/Bluetooth Keyboard with TrackPoint, that's why this patch reuses all of cptkbd functions, except for input mapping.
Signed-off-by: Florian Klink <flokli@flokli.de> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
Revision tags: v5.15.23, v5.15.22, v5.15.21, v5.15.20, v5.15.19, v5.15.18, v5.15.17, v5.4.173, v5.15.16, v5.15.15, v5.16, v5.15.10, v5.15.9, v5.15.8, v5.15.7, v5.15.6, v5.15.5, v5.15.4, v5.15.3, v5.15.2, v5.15.1, v5.15, v5.14.14, v5.14.13, v5.14.12, v5.14.11, v5.14.10, v5.14.9, v5.14.8, v5.14.7, v5.14.6, v5.10.67, v5.10.66, v5.14.5, v5.14.4, v5.10.65, v5.14.3, v5.10.64, v5.14.2, v5.10.63, v5.14.1, v5.10.62, v5.14, v5.10.61, v5.10.60, v5.10.53, v5.10.52, v5.10.51, v5.10.50, v5.10.49, v5.13, v5.10.46, v5.10.43, v5.10.42, v5.10.41, v5.10.40, v5.10.39, v5.4.119, v5.10.36, v5.10.35, v5.10.34, v5.4.116, v5.10.33, v5.12, v5.10.32, v5.10.31, v5.10.30 |
|
#
c158c2af |
| 04-Apr-2021 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Add support for Thinkpad X1 Tablet Thin keyboard
The Thinkpad X1 Tablet Thin keyboard's HID interface for the media-keys and other special functions, is quite similar to the Thinkpad 10
HID: lenovo: Add support for Thinkpad X1 Tablet Thin keyboard
The Thinkpad X1 Tablet Thin keyboard's HID interface for the media-keys and other special functions, is quite similar to the Thinkpad 10 ultrabook keyboard's mouse/media-keys HID interface.
The only difference is that it needs a bit different key mappings.
Add support for the mute-LED and the non-standard media-keys on this keyboard by re-using the tp10_ultrabook_kbd code combined with a new lenovo_input_mapping_x1_tab_kbd() function.
Co-authored-by: Alexander Kobel <a-kobel@a-kobel.de> Tested-by: Alexander Kobel <a-kobel@a-kobel.de> Signed-off-by: Alexander Kobel <a-kobel@a-kobel.de> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
#
2d0f1c07 |
| 04-Apr-2021 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Rework how the tp10ubkbd code decides which USB interface to use
Instead of looking for a hdev with a type of HID_TYPE_USBMOUSE find the interface for the mute/mic-mute/fn-lock LEDs by
HID: lenovo: Rework how the tp10ubkbd code decides which USB interface to use
Instead of looking for a hdev with a type of HID_TYPE_USBMOUSE find the interface for the mute/mic-mute/fn-lock LEDs by checking for the output-report which is used to set them.
This is a preparation patch for adding support for the LEDs on the X1 tablet thin keyboard which uses the same output-report, but has a separate (third) USB interface for the touchpad/mouse functionality.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
#
e2da5ff4 |
| 04-Apr-2021 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Set default_triggers for the mute and micmute LEDs
The mute and mic-mute LEDs should be automatically turned on/off based on the audio-card's mixer settings.
Add the standardized defau
HID: lenovo: Set default_triggers for the mute and micmute LEDs
The mute and mic-mute LEDs should be automatically turned on/off based on the audio-card's mixer settings.
Add the standardized default-trigger names for this, so that the alsa code can turn the LEDs on/off as appropriate (on supported audio cards).
This brings the mute/mic-mute LED support inline with the thinkpad_acpi support for the same LEDs in keyboards directly connected to the laptop's embedded-controller.
Reviewed-by: Marek Behún <kabel@kernel.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
#
61710324 |
| 04-Apr-2021 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Map mic-mute button to KEY_F20 instead of KEY_MICMUTE
Mapping the mic-mute button to KEY_MICMUTE is technically correct but KEY_MICMUTE translates to a scancode of 256 (248 + 8) under X
HID: lenovo: Map mic-mute button to KEY_F20 instead of KEY_MICMUTE
Mapping the mic-mute button to KEY_MICMUTE is technically correct but KEY_MICMUTE translates to a scancode of 256 (248 + 8) under X, which does not fit in 8 bits, so it does not work.
Because of this userspace is expecting KEY_F20 instead, theoretically KEY_MICMUTE should work under Wayland but even there it does not work, because the desktop-environment is listening only for KEY_F20 and not for KEY_MICMUTE.
Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support") Reviewed-by: Marek Behún <kabel@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
#
8744eeec |
| 04-Apr-2021 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Set LEDs max_brightness value
The LEDs can only by turned on/off, so max_brightness should be set to 1. Without this the max_brightness sysfs-attribute will report 255 which is wrong.
HID: lenovo: Set LEDs max_brightness value
The LEDs can only by turned on/off, so max_brightness should be set to 1. Without this the max_brightness sysfs-attribute will report 255 which is wrong.
Reviewed-by: Marek Behún <kabel@kernel.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
#
033c9786 |
| 04-Apr-2021 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Remove lenovo_led_brightness_get()
The led_classdev already contains a cached value of the last set brightness, the brightness_get callback is only meant for LED drivers which can read
HID: lenovo: Remove lenovo_led_brightness_get()
The led_classdev already contains a cached value of the last set brightness, the brightness_get callback is only meant for LED drivers which can read back the actual / current brightness from the hardware.
Since lenovo_led_brightness_get() just returns the last set value it does not add any functionality, so we can just remove it.
Reviewed-by: Marek Behún <kabel@kernel.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
#
34348a86 |
| 04-Apr-2021 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Check hid_get_drvdata() returns non NULL in lenovo_event()
The HID lenovo probe function only attaches drvdata to one of the USB interfaces, but lenovo_event() will get called for all U
HID: lenovo: Check hid_get_drvdata() returns non NULL in lenovo_event()
The HID lenovo probe function only attaches drvdata to one of the USB interfaces, but lenovo_event() will get called for all USB interfaces to which hid-lenovo is bound.
This allows a malicious device to fake being a device handled by hid-lenovo, which generates events for which lenovo_event() has special handling (and thus dereferences hid_get_drvdata()) on another interface triggering a NULL pointer exception.
Add a check for hid_get_drvdata() returning NULL, avoiding this possible NULL pointer exception.
Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support") Reviewed-by: Marek Behún <kabel@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
#
658d04e6 |
| 04-Apr-2021 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Fix lenovo_led_set_tp10ubkbd() error handling
Fix the following issues with lenovo_led_set_tp10ubkbd() error handling:
1. On success hid_hw_raw_request() returns the number of bytes se
HID: lenovo: Fix lenovo_led_set_tp10ubkbd() error handling
Fix the following issues with lenovo_led_set_tp10ubkbd() error handling:
1. On success hid_hw_raw_request() returns the number of bytes sent. So we should check for (ret != 3) rather then for (ret != 0).
2. Actually propagate errors to the caller.
3. Since the LEDs are part of an USB keyboard-dock the mute LEDs can go away at any time. Don't log an error when ret == -ENODEV and set the LED_HW_PLUGGABLE flag to avoid errors getting logged when the USB gets disconnected.
Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support") Reviewed-by: Marek Behún <kabel@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
#
bbf62645 |
| 04-Apr-2021 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Use brightness_set_blocking callback for setting LEDs brightness
The lenovo_led_brightness_set function may sleep, so we should have the the led_class_dev's brightness_set_blocking call
HID: lenovo: Use brightness_set_blocking callback for setting LEDs brightness
The lenovo_led_brightness_set function may sleep, so we should have the the led_class_dev's brightness_set_blocking callback point to it, rather then the regular brightness_set callback.
When toggled through sysfs this is not a problem, but the brightness_set callback may be called from atomic context when using LED-triggers.
Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support") Reviewed-by: Marek Behún <kabel@kernel.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
#
348f68ae |
| 04-Apr-2021 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Map mic-mute button to KEY_F20 instead of KEY_MICMUTE
[ Upstream commit 617103246cfd19af837e4cb614ba9f877c4f7779 ]
Mapping the mic-mute button to KEY_MICMUTE is technically correct but
HID: lenovo: Map mic-mute button to KEY_F20 instead of KEY_MICMUTE
[ Upstream commit 617103246cfd19af837e4cb614ba9f877c4f7779 ]
Mapping the mic-mute button to KEY_MICMUTE is technically correct but KEY_MICMUTE translates to a scancode of 256 (248 + 8) under X, which does not fit in 8 bits, so it does not work.
Because of this userspace is expecting KEY_F20 instead, theoretically KEY_MICMUTE should work under Wayland but even there it does not work, because the desktop-environment is listening only for KEY_F20 and not for KEY_MICMUTE.
Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support") Reviewed-by: Marek Behún <kabel@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
9b14027e |
| 04-Apr-2021 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Check hid_get_drvdata() returns non NULL in lenovo_event()
[ Upstream commit 34348a8661e3cd67dcf6938f08c8bb77522301f7 ]
The HID lenovo probe function only attaches drvdata to one of th
HID: lenovo: Check hid_get_drvdata() returns non NULL in lenovo_event()
[ Upstream commit 34348a8661e3cd67dcf6938f08c8bb77522301f7 ]
The HID lenovo probe function only attaches drvdata to one of the USB interfaces, but lenovo_event() will get called for all USB interfaces to which hid-lenovo is bound.
This allows a malicious device to fake being a device handled by hid-lenovo, which generates events for which lenovo_event() has special handling (and thus dereferences hid_get_drvdata()) on another interface triggering a NULL pointer exception.
Add a check for hid_get_drvdata() returning NULL, avoiding this possible NULL pointer exception.
Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support") Reviewed-by: Marek Behún <kabel@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
5ccdc6dd |
| 04-Apr-2021 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Fix lenovo_led_set_tp10ubkbd() error handling
[ Upstream commit 658d04e6eb6be1601ae95d7bee92bbf4096cdc1e ]
Fix the following issues with lenovo_led_set_tp10ubkbd() error handling:
1.
HID: lenovo: Fix lenovo_led_set_tp10ubkbd() error handling
[ Upstream commit 658d04e6eb6be1601ae95d7bee92bbf4096cdc1e ]
Fix the following issues with lenovo_led_set_tp10ubkbd() error handling:
1. On success hid_hw_raw_request() returns the number of bytes sent. So we should check for (ret != 3) rather then for (ret != 0).
2. Actually propagate errors to the caller.
3. Since the LEDs are part of an USB keyboard-dock the mute LEDs can go away at any time. Don't log an error when ret == -ENODEV and set the LED_HW_PLUGGABLE flag to avoid errors getting logged when the USB gets disconnected.
Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support") Reviewed-by: Marek Behún <kabel@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
29bfd044 |
| 04-Apr-2021 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Use brightness_set_blocking callback for setting LEDs brightness
[ Upstream commit bbf62645255f120bc2e7488c237e3f04da42ec70 ]
The lenovo_led_brightness_set function may sleep, so we sh
HID: lenovo: Use brightness_set_blocking callback for setting LEDs brightness
[ Upstream commit bbf62645255f120bc2e7488c237e3f04da42ec70 ]
The lenovo_led_brightness_set function may sleep, so we should have the the led_class_dev's brightness_set_blocking callback point to it, rather then the regular brightness_set callback.
When toggled through sysfs this is not a problem, but the brightness_set callback may be called from atomic context when using LED-triggers.
Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support") Reviewed-by: Marek Behún <kabel@kernel.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v5.10.27, v5.10.26, v5.10.25, v5.10.24, v5.10.23, v5.10.22, v5.10.21, v5.10.20, v5.10.19, v5.4.101, v5.10.18, v5.10.17, v5.11, v5.10.16, v5.10.15, v5.10.14, v5.10, v5.8.17, v5.8.16, v5.8.15, v5.9, v5.8.14, v5.8.13, v5.8.12, v5.8.11, v5.8.10, v5.8.9, v5.8.8, v5.8.7, v5.8.6, v5.4.62, v5.8.5, v5.8.4, v5.4.61, v5.8.3, v5.4.60, v5.8.2, v5.4.59, v5.8.1, v5.4.58, v5.4.57, v5.4.56, v5.8, v5.7.12, v5.4.55, v5.7.11, v5.4.54, v5.7.10, v5.4.53, v5.4.52, v5.7.9, v5.7.8, v5.4.51 |
|
#
49429428 |
| 04-Jul-2020 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Fix spurious F23 key press report during resume from suspend
The Ultrabook Keyboard sends a spurious F23 key-press when resuming from suspend. GNOME uses F23 to toggle the touchpad on/o
HID: lenovo: Fix spurious F23 key press report during resume from suspend
The Ultrabook Keyboard sends a spurious F23 key-press when resuming from suspend. GNOME uses F23 to toggle the touchpad on/off so this causes the OSD graphics for the touchpad toggle to show on resume.
The keyboard does not actually have a F23 key, se we can simple fix it by marking the 0x00070072 HID usage, which normally is F23, to be ignored.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
#
c87de33e |
| 04-Jul-2020 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard fn_lock support
Add support for setting the Fn lock value of the ThinkPad 10 Ultrabook Keyboard through sysfs, re-using the fn_lock sysfs attribute re
HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard fn_lock support
Add support for setting the Fn lock value of the ThinkPad 10 Ultrabook Keyboard through sysfs, re-using the fn_lock sysfs attribute read/write helpers from the existing ThinkPad Compact Keyboard with TrackPoint support.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
#
bc04b37e |
| 04-Jul-2020 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support
Some of the function keys special functions all use the same 0x000c0001 usage code, add a mapping for these based on the usage_index;
And add
HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support
Some of the function keys special functions all use the same 0x000c0001 usage code, add a mapping for these based on the usage_index;
And add support for the Speaker and Mic mute LEDs integrated into the F1 and F4 keys.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|
#
ef550c5d |
| 04-Jul-2020 |
Hans de Goede <hdegoede@redhat.com> |
HID: lenovo: Rename fn_lock sysfs attr handlers to make them generic
Except for a single call, there is nothing keyboard-model specific about the cptkbd fn_lock sysfs attr handlers, rename them drop
HID: lenovo: Rename fn_lock sysfs attr handlers to make them generic
Except for a single call, there is nothing keyboard-model specific about the cptkbd fn_lock sysfs attr handlers, rename them dropping the cptkbd post-/pre-fix, so that they can be re-used for supporting Fn-lock on the Thinkpad 10 ultrabook kbd.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
show more ...
|