diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2010-09-05 15:25:11 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-09-05 15:57:58 -0400 |
commit | fed87e655a2c20468d628b37424af58287803afe (patch) | |
tree | 04e683df294ce2f1eff04196f9454539f236f986 | |
parent | 92944c1c943647c7eb39c081feeecdd169f68ee4 (diff) |
Input: wacom - add fuzz parameters to features
The signal-to-noise ratio varies between devices, but currently all
devices are treated the same way. Add fuzz parameters to the feature
struct, allowing for tailored treatment of devices.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 6 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 9 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.h | 4 |
3 files changed, 15 insertions, 4 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 42ba3691d908..e510e4fb54f7 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -333,8 +333,12 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf, | |||
333 | struct usb_host_interface *interface = intf->cur_altsetting; | 333 | struct usb_host_interface *interface = intf->cur_altsetting; |
334 | struct hid_descriptor *hid_desc; | 334 | struct hid_descriptor *hid_desc; |
335 | 335 | ||
336 | /* default device to penabled */ | 336 | /* default features */ |
337 | features->device_type = BTN_TOOL_PEN; | 337 | features->device_type = BTN_TOOL_PEN; |
338 | features->x_fuzz = 4; | ||
339 | features->y_fuzz = 4; | ||
340 | features->pressure_fuzz = 0; | ||
341 | features->distance_fuzz = 0; | ||
338 | 342 | ||
339 | /* only Tablet PCs need to retrieve the info */ | 343 | /* only Tablet PCs need to retrieve the info */ |
340 | if ((features->type != TABLETPC) && (features->type != TABLETPC2FG)) | 344 | if ((features->type != TABLETPC) && (features->type != TABLETPC2FG)) |
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 6e29badb969e..6d7e1647715f 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -951,9 +951,12 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
951 | 951 | ||
952 | __set_bit(BTN_TOUCH, input_dev->keybit); | 952 | __set_bit(BTN_TOUCH, input_dev->keybit); |
953 | 953 | ||
954 | input_set_abs_params(input_dev, ABS_X, 0, features->x_max, 4, 0); | 954 | input_set_abs_params(input_dev, ABS_X, 0, features->x_max, |
955 | input_set_abs_params(input_dev, ABS_Y, 0, features->y_max, 4, 0); | 955 | features->x_fuzz, 0); |
956 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, 0, 0); | 956 | input_set_abs_params(input_dev, ABS_Y, 0, features->y_max, |
957 | features->y_fuzz, 0); | ||
958 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, | ||
959 | features->pressure_fuzz, 0); | ||
957 | 960 | ||
958 | __set_bit(ABS_MISC, input_dev->absbit); | 961 | __set_bit(ABS_MISC, input_dev->absbit); |
959 | 962 | ||
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index 99e1a54cd305..d769e9aa6f10 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h | |||
@@ -73,6 +73,10 @@ struct wacom_features { | |||
73 | int y_phy; | 73 | int y_phy; |
74 | unsigned char unit; | 74 | unsigned char unit; |
75 | unsigned char unitExpo; | 75 | unsigned char unitExpo; |
76 | int x_fuzz; | ||
77 | int y_fuzz; | ||
78 | int pressure_fuzz; | ||
79 | int distance_fuzz; | ||
76 | }; | 80 | }; |
77 | 81 | ||
78 | struct wacom_shared { | 82 | struct wacom_shared { |