Skip to content

Commit

Permalink
HID: Microsoft Win8 Wireless Radio Controls cleanup
Browse files Browse the repository at this point in the history
Use a better URL for the HUTRR40 Radio HID Usages documentation and use the
HID_GD_WIRELESS_RADIO_CTLS define rather then hardcoding a check for
0x0001000c.

Fixes: 61df56b ("HID: Add mapping for Microsoft Win8 Wireless Radio Controls extensions")
Suggested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Hans de Goede authored and Jiri Kosina committed May 22, 2017
1 parent f1918be commit 6e7edab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/hid/hid-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel

case HID_GD_RFKILL_BTN:
/* MS wireless radio ctl extension, also check CA */
if (field->application == 0x0001000c) {
if (field->application == HID_GD_WIRELESS_RADIO_CTLS) {
map_key_clear(KEY_RFKILL);
/* We need to simulate the btn release */
field->flags |= HID_MAIN_ITEM_RELATIVE;
Expand Down
5 changes: 2 additions & 3 deletions include/linux/hid.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,8 @@ struct hid_item {
#define HID_GD_KEYPAD 0x00010007
#define HID_GD_MULTIAXIS 0x00010008
/*
* Microsoft Win8 Wireless Radio Controls extensions CA, see (checked 09052017):
* https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/airplane-mode-radio-management
* https://web.archive.org/web/20170509144631/https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/airplane-mode-radio-management
* Microsoft Win8 Wireless Radio Controls extensions CA, see:
* http://www.usb.org/developers/hidpage/HUTRR40RadioHIDUsagesFinal.pdf
*/
#define HID_GD_WIRELESS_RADIO_CTLS 0x0001000c
#define HID_GD_X 0x00010030
Expand Down

0 comments on commit 6e7edab

Please sign in to comment.