Commit f3f24e7b authored by Ping Cheng's avatar Ping Cheng Committed by Jiri Kosina

HID: wacom: generic: Pad supports more than buttons

Make sure everything reported from pad are registered
Signed-off-by: default avatarPing Cheng <ping.cheng@wacom.com>
Reviewed-By: default avatarJason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 6f46cf9b
...@@ -1538,14 +1538,17 @@ static void wacom_wac_pad_usage_mapping(struct hid_device *hdev, ...@@ -1538,14 +1538,17 @@ static void wacom_wac_pad_usage_mapping(struct hid_device *hdev,
case WACOM_HID_WD_ACCELEROMETER_X: case WACOM_HID_WD_ACCELEROMETER_X:
__set_bit(INPUT_PROP_ACCELEROMETER, input->propbit); __set_bit(INPUT_PROP_ACCELEROMETER, input->propbit);
wacom_map_usage(input, usage, field, EV_ABS, ABS_X, 0); wacom_map_usage(input, usage, field, EV_ABS, ABS_X, 0);
features->device_type |= WACOM_DEVICETYPE_PAD;
break; break;
case WACOM_HID_WD_ACCELEROMETER_Y: case WACOM_HID_WD_ACCELEROMETER_Y:
__set_bit(INPUT_PROP_ACCELEROMETER, input->propbit); __set_bit(INPUT_PROP_ACCELEROMETER, input->propbit);
wacom_map_usage(input, usage, field, EV_ABS, ABS_Y, 0); wacom_map_usage(input, usage, field, EV_ABS, ABS_Y, 0);
features->device_type |= WACOM_DEVICETYPE_PAD;
break; break;
case WACOM_HID_WD_ACCELEROMETER_Z: case WACOM_HID_WD_ACCELEROMETER_Z:
__set_bit(INPUT_PROP_ACCELEROMETER, input->propbit); __set_bit(INPUT_PROP_ACCELEROMETER, input->propbit);
wacom_map_usage(input, usage, field, EV_ABS, ABS_Z, 0); wacom_map_usage(input, usage, field, EV_ABS, ABS_Z, 0);
features->device_type |= WACOM_DEVICETYPE_PAD;
break; break;
case WACOM_HID_WD_BUTTONHOME: case WACOM_HID_WD_BUTTONHOME:
case WACOM_HID_WD_BUTTONUP: case WACOM_HID_WD_BUTTONUP:
...@@ -1557,18 +1560,23 @@ static void wacom_wac_pad_usage_mapping(struct hid_device *hdev, ...@@ -1557,18 +1560,23 @@ static void wacom_wac_pad_usage_mapping(struct hid_device *hdev,
wacom_numbered_button_to_key(features->numbered_buttons), wacom_numbered_button_to_key(features->numbered_buttons),
0); 0);
features->numbered_buttons++; features->numbered_buttons++;
features->device_type |= WACOM_DEVICETYPE_PAD;
break; break;
case WACOM_HID_WD_TOUCHONOFF: case WACOM_HID_WD_TOUCHONOFF:
wacom_map_usage(input, usage, field, EV_SW, SW_MUTE_DEVICE, 0); wacom_map_usage(input, usage, field, EV_SW, SW_MUTE_DEVICE, 0);
features->device_type |= WACOM_DEVICETYPE_PAD;
break; break;
case WACOM_HID_WD_TOUCHSTRIP: case WACOM_HID_WD_TOUCHSTRIP:
wacom_map_usage(input, usage, field, EV_ABS, ABS_RX, 0); wacom_map_usage(input, usage, field, EV_ABS, ABS_RX, 0);
features->device_type |= WACOM_DEVICETYPE_PAD;
break; break;
case WACOM_HID_WD_TOUCHSTRIP2: case WACOM_HID_WD_TOUCHSTRIP2:
wacom_map_usage(input, usage, field, EV_ABS, ABS_RY, 0); wacom_map_usage(input, usage, field, EV_ABS, ABS_RY, 0);
features->device_type |= WACOM_DEVICETYPE_PAD;
break; break;
case WACOM_HID_WD_TOUCHRING: case WACOM_HID_WD_TOUCHRING:
wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0); wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0);
features->device_type |= WACOM_DEVICETYPE_PAD;
break; break;
} }
...@@ -1578,6 +1586,7 @@ static void wacom_wac_pad_usage_mapping(struct hid_device *hdev, ...@@ -1578,6 +1586,7 @@ static void wacom_wac_pad_usage_mapping(struct hid_device *hdev,
wacom_numbered_button_to_key(features->numbered_buttons), wacom_numbered_button_to_key(features->numbered_buttons),
0); 0);
features->numbered_buttons++; features->numbered_buttons++;
features->device_type |= WACOM_DEVICETYPE_PAD;
break; break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment