Skip to content

HID: asus: Add Fn+F5 fan control key support for ROG laptops

Ionut Nechita (Sunlight Linux) linux-input lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 2 repliesIn review
  2. v34 patches 1 replySuperseded
  3. v24 patches 9 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch1 replySuperseded

Changes in v5 from the cover letter

- Removed IS_REACHABLE(CONFIG_ASUS_WMI) guards from patch 3 as asus_wmi_evaluate_method() already returns -ENODEV when asus-wmi is not available, and the warning is helpful for users (Mario's feedback)
- Updated commit message for patch 3 to reflect the removal of conditional compilation guards

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4HID: asus: Replace magic number with HID_UP_ASUSVENDOR constantdrivers/hid/hid-asus.c+1 -10 replies
2/4HID: asus: Filter spurious HID vendor codes on ROG laptopsdrivers/hid/hid-asus.c+22 -00 replies
3/4HID: asus: Add WMI communication infrastructuredrivers/hid/hid-asus.c include/linux/platform_data/x86/asus-wmi.h+25 -00 replies
4/4HID: asus: Implement Fn+F5 fan control key handlerdrivers/hid/hid-asus.c+30 -50 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchDenis BenatoMario Limonciello (AMD)
1/4R-b R-b
2/4R-b R-b
3/4R-b R-b
4/4R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/4] HID: asus: Add Fn+F5 fan control key support for ROG laptops

From: Ionut Nechita <[email protected]>

This series adds support for the Fn+F5 fan control key on Asus ROG laptops and addresses spurious HID vendor codes that cause kernel log spam on these devices.

The series introduces:
1. Code cleanup by replacing a magic number with an existing constant
2. Filtering of spurious HID vendor usage codes on ROG laptops
3. Infrastructure for HID-to-WMI communication
4. Fn+F5 fan control key handler with userspace fallback support

The Fn+F5 key handler attempts to forward events to asus-wmi when available. If asus-wmi is unavailable or fails, the event is passed to userspace via evdev, allowing userspace fan control implementations.

Tested on Asus ROG series laptops.

Changes in v5:
- Removed IS_REACHABLE(CONFIG_ASUS_WMI) guards from patch 3 as asus_wmi_evaluate_method() already returns -ENODEV when asus-wmi is not available, and the warning is helpful for users (Mario's feedback)
- Updated commit message for patch 3 to reflect the removal of conditional compilation guards

Changes in v4:
- Added Reviewed-by tag from Mario Limonciello (AMD) to all patches

Changes in v3:
- Added IS_REACHABLE(CONFIG_ASUS_WMI) conditional compilation guards to prevent build failures when asus-wmi is not compiled (patch 3)
- Modified Fn+F5 handler to pass events to userspace when asus-wmi is unavailable or fails, enabling userspace fan control (patch 4)
- Updated comments and commit message to reflect that spurious codes affect all ROG laptops, not just G14/G15, and occur during normal operation, not just on keypresses (patch 2)
- Simplified commit message for WMI infrastructure patch (patch 3)
- Added Reviewed-by tag from Denis Benato
- Removed Change-Id tags

Changes in v2:
- Split the original patch into a logical series of 4 patches
- Improved code organization and commit messages

Ionut Nechita (4):
HID: asus: Replace magic number with HID_UP_ASUSVENDOR constant
HID: asus: Filter spurious HID vendor codes on ROG laptops
HID: asus: Add WMI communication infrastructure
HID: asus: Implement Fn+F5 fan control key handler

 drivers/hid/hid-asus.c                     | 73 +++++++++++++++++++++-
 include/linux/platform_data/x86/asus-wmi.h |  1 +
 2 files changed, 73 insertions(+), 1 deletion(-)

--
2.52.0