aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorPing Cheng <pinglinux@gmail.com>2014-05-29 03:08:41 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-05-29 03:09:16 -0400
commitac414da37f88ddbc04617d883539113f27c75f56 (patch)
tree722957806cfba2c00bcc8e29616096ca9ade99fe /drivers/input
parent805a876af7261cbe11498ae544add0bc8ad74192 (diff)
Input: wacom - process outbound for newer Cintiqs
New Cintiq tablets have a 200 tablet counts outside of screen area. Add x/y_min for ABS_X/Y to pass this information to userland. Signed-off-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/tablet/wacom_wac.c44
-rw-r--r--drivers/input/tablet/wacom_wac.h2
2 files changed, 24 insertions, 22 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index c98e51c5591f..977d05cd9e2e 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1576,10 +1576,10 @@ static void wacom_abs_set_axis(struct input_dev *input_dev,
1576 struct wacom_features *features = &wacom_wac->features; 1576 struct wacom_features *features = &wacom_wac->features;
1577 1577
1578 if (features->device_type == BTN_TOOL_PEN) { 1578 if (features->device_type == BTN_TOOL_PEN) {
1579 input_set_abs_params(input_dev, ABS_X, 0, features->x_max, 1579 input_set_abs_params(input_dev, ABS_X, features->x_min,
1580 features->x_fuzz, 0); 1580 features->x_max, features->x_fuzz, 0);
1581 input_set_abs_params(input_dev, ABS_Y, 0, features->y_max, 1581 input_set_abs_params(input_dev, ABS_Y, features->y_min,
1582 features->y_fuzz, 0); 1582 features->y_max, features->y_fuzz, 0);
1583 input_set_abs_params(input_dev, ABS_PRESSURE, 0, 1583 input_set_abs_params(input_dev, ABS_PRESSURE, 0,
1584 features->pressure_max, features->pressure_fuzz, 0); 1584 features->pressure_max, features->pressure_fuzz, 0);
1585 1585
@@ -2135,11 +2135,11 @@ static const struct wacom_features wacom_features_0x317 =
2135 63, INTUOSPL, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 2135 63, INTUOSPL, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES,
2136 .touch_max = 16 }; 2136 .touch_max = 16 };
2137static const struct wacom_features wacom_features_0xF4 = 2137static const struct wacom_features wacom_features_0xF4 =
2138 { "Wacom Cintiq 24HD", WACOM_PKGLEN_INTUOS, 104480, 65600, 2047, 2138 { "Wacom Cintiq 24HD", WACOM_PKGLEN_INTUOS, 104280, 65400, 2047,
2139 63, WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 2139 63, WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 200, 200 };
2140static const struct wacom_features wacom_features_0xF8 = 2140static const struct wacom_features wacom_features_0xF8 =
2141 { "Wacom Cintiq 24HD touch", WACOM_PKGLEN_INTUOS, 104480, 65600, 2047, /* Pen */ 2141 { "Wacom Cintiq 24HD touch", WACOM_PKGLEN_INTUOS, 104280, 65400, 2047, /* Pen */
2142 63, WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 2142 63, WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 200, 200,
2143 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf6 }; 2143 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf6 };
2144static const struct wacom_features wacom_features_0xF6 = 2144static const struct wacom_features wacom_features_0xF6 =
2145 { "Wacom Cintiq 24HD touch", .type = WACOM_24HDT, /* Touch */ 2145 { "Wacom Cintiq 24HD touch", .type = WACOM_24HDT, /* Touch */
@@ -2154,8 +2154,8 @@ static const struct wacom_features wacom_features_0xC6 =
2154 { "Wacom Cintiq 12WX", WACOM_PKGLEN_INTUOS, 53020, 33440, 1023, 2154 { "Wacom Cintiq 12WX", WACOM_PKGLEN_INTUOS, 53020, 33440, 1023,
2155 63, WACOM_BEE, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 2155 63, WACOM_BEE, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2156static const struct wacom_features wacom_features_0x304 = 2156static const struct wacom_features wacom_features_0x304 =
2157 { "Wacom Cintiq 13HD", WACOM_PKGLEN_INTUOS, 59552, 33848, 1023, 2157 { "Wacom Cintiq 13HD", WACOM_PKGLEN_INTUOS, 59352, 33648, 1023,
2158 63, WACOM_13HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 2158 63, WACOM_13HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 200, 200 };
2159static const struct wacom_features wacom_features_0xC7 = 2159static const struct wacom_features wacom_features_0xC7 =
2160 { "Wacom DTU1931", WACOM_PKGLEN_GRAPHIRE, 37832, 30305, 511, 2160 { "Wacom DTU1931", WACOM_PKGLEN_GRAPHIRE, 37832, 30305, 511,
2161 0, PL, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 2161 0, PL, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
@@ -2169,24 +2169,24 @@ static const struct wacom_features wacom_features_0xFB =
2169 { "Wacom DTU1031", WACOM_PKGLEN_DTUS, 22096, 13960, 511, 2169 { "Wacom DTU1031", WACOM_PKGLEN_DTUS, 22096, 13960, 511,
2170 0, DTUS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 2170 0, DTUS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
2171static const struct wacom_features wacom_features_0x57 = 2171static const struct wacom_features wacom_features_0x57 =
2172 { "Wacom DTK2241", WACOM_PKGLEN_INTUOS, 95840, 54260, 2047, 2172 { "Wacom DTK2241", WACOM_PKGLEN_INTUOS, 95640, 54060, 2047,
2173 63, DTK, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES}; 2173 63, DTK, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 200, 200 };
2174static const struct wacom_features wacom_features_0x59 = /* Pen */ 2174static const struct wacom_features wacom_features_0x59 = /* Pen */
2175 { "Wacom DTH2242", WACOM_PKGLEN_INTUOS, 95840, 54260, 2047, 2175 { "Wacom DTH2242", WACOM_PKGLEN_INTUOS, 95640, 54060, 2047,
2176 63, DTK, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 2176 63, DTK, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 200, 200,
2177 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5D }; 2177 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5D };
2178static const struct wacom_features wacom_features_0x5D = /* Touch */ 2178static const struct wacom_features wacom_features_0x5D = /* Touch */
2179 { "Wacom DTH2242", .type = WACOM_24HDT, 2179 { "Wacom DTH2242", .type = WACOM_24HDT,
2180 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x59, .touch_max = 10 }; 2180 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x59, .touch_max = 10 };
2181static const struct wacom_features wacom_features_0xCC = 2181static const struct wacom_features wacom_features_0xCC =
2182 { "Wacom Cintiq 21UX2", WACOM_PKGLEN_INTUOS, 87200, 65600, 2047, 2182 { "Wacom Cintiq 21UX2", WACOM_PKGLEN_INTUOS, 87000, 65400, 2047,
2183 63, WACOM_21UX2, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 2183 63, WACOM_21UX2, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 200, 200 };
2184static const struct wacom_features wacom_features_0xFA = 2184static const struct wacom_features wacom_features_0xFA =
2185 { "Wacom Cintiq 22HD", WACOM_PKGLEN_INTUOS, 95840, 54260, 2047, 2185 { "Wacom Cintiq 22HD", WACOM_PKGLEN_INTUOS, 95640, 54060, 2047,
2186 63, WACOM_22HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 2186 63, WACOM_22HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 200, 200 };
2187static const struct wacom_features wacom_features_0x5B = 2187static const struct wacom_features wacom_features_0x5B =
2188 { "Wacom Cintiq 22HDT", WACOM_PKGLEN_INTUOS, 95840, 54260, 2047, 2188 { "Wacom Cintiq 22HDT", WACOM_PKGLEN_INTUOS, 95640, 54060, 2047,
2189 63, WACOM_22HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 2189 63, WACOM_22HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 200, 200,
2190 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5e }; 2190 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5e };
2191static const struct wacom_features wacom_features_0x5E = 2191static const struct wacom_features wacom_features_0x5E =
2192 { "Wacom Cintiq 22HDT", .type = WACOM_24HDT, 2192 { "Wacom Cintiq 22HDT", .type = WACOM_24HDT,
@@ -2340,8 +2340,8 @@ static const struct wacom_features wacom_features_0x6004 =
2340 { "ISD-V4", WACOM_PKGLEN_GRAPHIRE, 12800, 8000, 255, 2340 { "ISD-V4", WACOM_PKGLEN_GRAPHIRE, 12800, 8000, 255,
2341 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 2341 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
2342static const struct wacom_features wacom_features_0x0307 = 2342static const struct wacom_features wacom_features_0x0307 =
2343 { "Wacom ISDv5 307", WACOM_PKGLEN_INTUOS, 59552, 33848, 2047, 2343 { "Wacom ISDv5 307", WACOM_PKGLEN_INTUOS, 59352, 33648, 2047,
2344 63, CINTIQ_HYBRID, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 2344 63, CINTIQ_HYBRID, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 200, 200,
2345 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x309 }; 2345 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x309 };
2346static const struct wacom_features wacom_features_0x0309 = 2346static const struct wacom_features wacom_features_0x0309 =
2347 { "Wacom ISDv5 309", .type = WACOM_24HDT, /* Touch */ 2347 { "Wacom ISDv5 309", .type = WACOM_24HDT, /* Touch */
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
index 29774cae7da1..b2c9a9c1b551 100644
--- a/drivers/input/tablet/wacom_wac.h
+++ b/drivers/input/tablet/wacom_wac.h
@@ -122,6 +122,8 @@ struct wacom_features {
122 int type; 122 int type;
123 int x_resolution; 123 int x_resolution;
124 int y_resolution; 124 int y_resolution;
125 int x_min;
126 int y_min;
125 int device_type; 127 int device_type;
126 int x_phy; 128 int x_phy;
127 int y_phy; 129 int y_phy;