summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/wacom_w8001.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-02-18 20:11:27 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-18 20:11:27 (GMT)
commit80ae3fa5d6712ef3625eff617f72e190645d6361 (patch)
treefd9be0ecbb4baa6385aa1a75af7ced5f7d691be4 /drivers/input/touchscreen/wacom_w8001.c
parent59db5b2b9e0327e545ff5764dadcb26062c2ab1f (diff)
parent85e2efbb1db9a18d218006706d6e4fbeb0216213 (diff)
downloadlinux-80ae3fa5d6712ef3625eff617f72e190645d6361.tar.xz
Merge 2.6.38-rc5 into staging-next
This is to resolve a merge conflict with: drivers/staging/zram/zram_drv.c as pointed out by Stephen Rothwell Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Nitin Gupta <ngupta@vflare.org> Cc: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/input/touchscreen/wacom_w8001.c')
-rw-r--r--drivers/input/touchscreen/wacom_w8001.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c
index 5cb8449..c14412e 100644
--- a/drivers/input/touchscreen/wacom_w8001.c
+++ b/drivers/input/touchscreen/wacom_w8001.c
@@ -51,6 +51,10 @@ MODULE_LICENSE("GPL");
#define W8001_PKTLEN_TPCCTL 11 /* control packet */
#define W8001_PKTLEN_TOUCH2FG 13
+/* resolution in points/mm */
+#define W8001_PEN_RESOLUTION 100
+#define W8001_TOUCH_RESOLUTION 10
+
struct w8001_coord {
u8 rdy;
u8 tsw;
@@ -198,7 +202,7 @@ static void parse_touchquery(u8 *data, struct w8001_touch_query *query)
query->y = 1024;
if (query->panel_res)
query->x = query->y = (1 << query->panel_res);
- query->panel_res = 10;
+ query->panel_res = W8001_TOUCH_RESOLUTION;
}
}
@@ -394,6 +398,8 @@ static int w8001_setup(struct w8001 *w8001)
input_set_abs_params(dev, ABS_X, 0, coord.x, 0, 0);
input_set_abs_params(dev, ABS_Y, 0, coord.y, 0, 0);
+ input_abs_set_res(dev, ABS_X, W8001_PEN_RESOLUTION);
+ input_abs_set_res(dev, ABS_Y, W8001_PEN_RESOLUTION);
input_set_abs_params(dev, ABS_PRESSURE, 0, coord.pen_pressure, 0, 0);
if (coord.tilt_x && coord.tilt_y) {
input_set_abs_params(dev, ABS_TILT_X, 0, coord.tilt_x, 0, 0);
@@ -418,14 +424,17 @@ static int w8001_setup(struct w8001 *w8001)
w8001->max_touch_x = touch.x;
w8001->max_touch_y = touch.y;
- /* scale to pen maximum */
if (w8001->max_pen_x && w8001->max_pen_y) {
+ /* if pen is supported scale to pen maximum */
touch.x = w8001->max_pen_x;
touch.y = w8001->max_pen_y;
+ touch.panel_res = W8001_PEN_RESOLUTION;
}
input_set_abs_params(dev, ABS_X, 0, touch.x, 0, 0);
input_set_abs_params(dev, ABS_Y, 0, touch.y, 0, 0);
+ input_abs_set_res(dev, ABS_X, touch.panel_res);
+ input_abs_set_res(dev, ABS_Y, touch.panel_res);
switch (touch.sensor_id) {
case 0: