aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r--drivers/input/tablet/wacom_wac.c42
1 files changed, 30 insertions, 12 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 121fdf7a73d2..b3252ef1e279 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1043,26 +1043,17 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)
1043 input_sync(wacom_wac->input); 1043 input_sync(wacom_wac->input);
1044} 1044}
1045 1045
1046static void wacom_setup_intuos(struct wacom_wac *wacom_wac) 1046static void wacom_setup_cintiq(struct wacom_wac *wacom_wac)
1047{ 1047{
1048 struct input_dev *input_dev = wacom_wac->input; 1048 struct input_dev *input_dev = wacom_wac->input;
1049 1049
1050 input_set_capability(input_dev, EV_MSC, MSC_SERIAL); 1050 input_set_capability(input_dev, EV_MSC, MSC_SERIAL);
1051 input_set_capability(input_dev, EV_REL, REL_WHEEL);
1052
1053 __set_bit(BTN_LEFT, input_dev->keybit);
1054 __set_bit(BTN_RIGHT, input_dev->keybit);
1055 __set_bit(BTN_MIDDLE, input_dev->keybit);
1056 __set_bit(BTN_SIDE, input_dev->keybit);
1057 __set_bit(BTN_EXTRA, input_dev->keybit);
1058 1051
1059 __set_bit(BTN_TOOL_RUBBER, input_dev->keybit); 1052 __set_bit(BTN_TOOL_RUBBER, input_dev->keybit);
1060 __set_bit(BTN_TOOL_PEN, input_dev->keybit); 1053 __set_bit(BTN_TOOL_PEN, input_dev->keybit);
1061 __set_bit(BTN_TOOL_MOUSE, input_dev->keybit);
1062 __set_bit(BTN_TOOL_BRUSH, input_dev->keybit); 1054 __set_bit(BTN_TOOL_BRUSH, input_dev->keybit);
1063 __set_bit(BTN_TOOL_PENCIL, input_dev->keybit); 1055 __set_bit(BTN_TOOL_PENCIL, input_dev->keybit);
1064 __set_bit(BTN_TOOL_AIRBRUSH, input_dev->keybit); 1056 __set_bit(BTN_TOOL_AIRBRUSH, input_dev->keybit);
1065 __set_bit(BTN_TOOL_LENS, input_dev->keybit);
1066 __set_bit(BTN_STYLUS, input_dev->keybit); 1057 __set_bit(BTN_STYLUS, input_dev->keybit);
1067 __set_bit(BTN_STYLUS2, input_dev->keybit); 1058 __set_bit(BTN_STYLUS2, input_dev->keybit);
1068 1059
@@ -1071,11 +1062,28 @@ static void wacom_setup_intuos(struct wacom_wac *wacom_wac)
1071 input_set_abs_params(input_dev, ABS_WHEEL, 0, 1023, 0, 0); 1062 input_set_abs_params(input_dev, ABS_WHEEL, 0, 1023, 0, 0);
1072 input_set_abs_params(input_dev, ABS_TILT_X, 0, 127, 0, 0); 1063 input_set_abs_params(input_dev, ABS_TILT_X, 0, 127, 0, 0);
1073 input_set_abs_params(input_dev, ABS_TILT_Y, 0, 127, 0, 0); 1064 input_set_abs_params(input_dev, ABS_TILT_Y, 0, 127, 0, 0);
1065}
1066
1067static void wacom_setup_intuos(struct wacom_wac *wacom_wac)
1068{
1069 struct input_dev *input_dev = wacom_wac->input;
1070
1071 input_set_capability(input_dev, EV_REL, REL_WHEEL);
1072
1073 wacom_setup_cintiq(wacom_wac);
1074
1075 __set_bit(BTN_LEFT, input_dev->keybit);
1076 __set_bit(BTN_RIGHT, input_dev->keybit);
1077 __set_bit(BTN_MIDDLE, input_dev->keybit);
1078 __set_bit(BTN_SIDE, input_dev->keybit);
1079 __set_bit(BTN_EXTRA, input_dev->keybit);
1080 __set_bit(BTN_TOOL_MOUSE, input_dev->keybit);
1081 __set_bit(BTN_TOOL_LENS, input_dev->keybit);
1082
1074 input_set_abs_params(input_dev, ABS_RZ, -900, 899, 0, 0); 1083 input_set_abs_params(input_dev, ABS_RZ, -900, 899, 0, 0);
1075 input_set_abs_params(input_dev, ABS_THROTTLE, -1023, 1023, 0, 0); 1084 input_set_abs_params(input_dev, ABS_THROTTLE, -1023, 1023, 0, 0);
1076} 1085}
1077 1086
1078
1079void wacom_setup_device_quirks(struct wacom_features *features) 1087void wacom_setup_device_quirks(struct wacom_features *features)
1080{ 1088{
1081 1089
@@ -1168,9 +1176,19 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
1168 __set_bit(BTN_9, input_dev->keybit); 1176 __set_bit(BTN_9, input_dev->keybit);
1169 /* fall through */ 1177 /* fall through */
1170 1178
1179 case CINTIQ:
1180 for (i = 0; i < 8; i++)
1181 __set_bit(BTN_0 + i, input_dev->keybit);
1182 __set_bit(BTN_TOOL_FINGER, input_dev->keybit);
1183
1184 input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
1185 input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
1186 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0);
1187 wacom_setup_cintiq(wacom_wac);
1188 break;
1189
1171 case INTUOS3: 1190 case INTUOS3:
1172 case INTUOS3L: 1191 case INTUOS3L:
1173 case CINTIQ:
1174 __set_bit(BTN_4, input_dev->keybit); 1192 __set_bit(BTN_4, input_dev->keybit);
1175 __set_bit(BTN_5, input_dev->keybit); 1193 __set_bit(BTN_5, input_dev->keybit);
1176 __set_bit(BTN_6, input_dev->keybit); 1194 __set_bit(BTN_6, input_dev->keybit);