Skip to content

Commit 7f55927

Browse files
Chris Chiubentiss
authored andcommitted
HID: input: support Microsoft wireless radio control hotkey
The ASUS laptops start to support the airplane mode radio management to replace the original mechanism of airplane mode toggle hotkey. On the ASUS P5440FF, it presents as a HID device connecting via I2C, named i2c-AMPD0001. When pressing it, the Embedded Controller send hid report via I2C and switch the airplane mode indicator LED based on the status. However, it's not working because it fails to be identified as a hidinput device. It fails in hidinput_connect() due to the macro IS_INPUT_APPLICATION doesn't have HID_GD_WIRELESS_RADIO_CTLS as a legit application code. It's easy to add the HID I2C vendor and product id to the quirk list and apply HID_QUIRK_HIDINPUT_FORCE to make it work. But it makes more sense to support it as a generic input application. Signed-off-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
1 parent 2fc00c1 commit 7f55927

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/linux/hid.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,8 @@ static inline bool hid_is_using_ll_driver(struct hid_device *hdev,
840840
#define IS_INPUT_APPLICATION(a) \
841841
(((a >= HID_UP_GENDESK) && (a <= HID_GD_MULTIAXIS)) \
842842
|| ((a >= HID_DG_PEN) && (a <= HID_DG_WHITEBOARD)) \
843-
|| (a == HID_GD_SYSTEM_CONTROL) || (a == HID_CP_CONSUMER_CONTROL))
843+
|| (a == HID_GD_SYSTEM_CONTROL) || (a == HID_CP_CONSUMER_CONTROL) \
844+
|| (a == HID_GD_WIRELESS_RADIO_CTLS))
844845

845846
/* HID core API */
846847

0 commit comments

Comments
 (0)