@@ -219,6 +219,8 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi
features->pressure_max = 255;
i += 4;
}
+ features->x_max *= features->x_scale;
+ features->x_fuzz *= features->x_scale;
break;
case HID_USAGE_Y:
@@ -251,6 +253,8 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi
i += 4;
}
}
+ features->y_max *= features->y_scale;
+ features->y_fuzz *= features->y_scale;
break;
case HID_USAGE_FINGER:
@@ -333,8 +337,14 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
struct usb_host_interface *interface = intf->cur_altsetting;
struct hid_descriptor *hid_desc;
- /* default device to penabled */
+ /* default features */
features->device_type = BTN_TOOL_PEN;
+ features->x_fuzz = 4;
+ features->y_fuzz = 4;
+ features->pressure_fuzz = 0;
+ features->distance_fuzz = 0;
+ features->x_scale = 1;
+ features->y_scale = 1;
/* only Tablet PCs need to retrieve the info */
if ((features->type != TABLETPC) && (features->type != TABLETPC2FG))
@@ -951,9 +951,12 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
__set_bit(BTN_TOUCH, input_dev->keybit);
- input_set_abs_params(input_dev, ABS_X, 0, features->x_max, 4, 0);
- input_set_abs_params(input_dev, ABS_Y, 0, features->y_max, 4, 0);
- input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, 0, 0);
+ input_set_abs_params(input_dev, ABS_X, 0, features->x_max,
+ features->x_fuzz, 0);
+ input_set_abs_params(input_dev, ABS_Y, 0, features->y_max,
+ features->y_fuzz, 0);
+ input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max,
+ features->pressure_fuzz, 0);
__set_bit(ABS_MISC, input_dev->absbit);
@@ -73,6 +73,12 @@ struct wacom_features {
int y_phy;
unsigned char unit;
unsigned char unitExpo;
+ int x_fuzz;
+ int y_fuzz;
+ int pressure_fuzz;
+ int distance_fuzz;
+ int x_scale;
+ int y_scale;
};
struct wacom_shared {