diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2010-09-05 15:26:16 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-09-05 15:58:12 -0400 |
commit | bc73dd39e78dd6e5b34cd938b7f037a8bc041bdd (patch) | |
tree | 9a2a8c5ea217708646e76429d274cbf25d1ebd2e /drivers/input/tablet/wacom_wac.c | |
parent | 4a88081e739a41d6d70bace7e0a027f9054ab540 (diff) |
Input: wacom - collect device quirks into single function
Collect device-specific code into a single function, and use quirks to
flag specific behavior instead.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/tablet/wacom_wac.c')
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 6d7e1647715f..44b4a59750d8 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -941,6 +941,22 @@ static void wacom_setup_intuos(struct wacom_wac *wacom_wac) | |||
941 | input_set_abs_params(input_dev, ABS_THROTTLE, -1023, 1023, 0, 0); | 941 | input_set_abs_params(input_dev, ABS_THROTTLE, -1023, 1023, 0, 0); |
942 | } | 942 | } |
943 | 943 | ||
944 | |||
945 | void wacom_setup_device_quirks(struct wacom_features *features) | ||
946 | { | ||
947 | |||
948 | /* touch device found but size is not defined. use default */ | ||
949 | if (features->device_type == BTN_TOOL_DOUBLETAP && !features->x_max) { | ||
950 | features->x_max = 1023; | ||
951 | features->y_max = 1023; | ||
952 | } | ||
953 | |||
954 | /* these device have multiple inputs */ | ||
955 | if (features->type == TABLETPC || features->type == TABLETPC2FG || | ||
956 | features->type == BAMBOO_PT) | ||
957 | features->quirks |= WACOM_QUIRK_MULTI_INPUT; | ||
958 | } | ||
959 | |||
944 | void wacom_setup_input_capabilities(struct input_dev *input_dev, | 960 | void wacom_setup_input_capabilities(struct input_dev *input_dev, |
945 | struct wacom_wac *wacom_wac) | 961 | struct wacom_wac *wacom_wac) |
946 | { | 962 | { |