Based on upstream commit 0d2b450961318c2abde1e8e70e9d940f986a814f
Signed-off-by: Jason Gerecke <[email protected]>
---
2.6.30/wacom_wac.c | 33 +++++++++++++++++++++++++++++++--
2.6.30/wacom_wac.h | 1 +
2.6.36/wacom_wac.c | 33 +++++++++++++++++++++++++++++++--
2.6.36/wacom_wac.h | 1 +
2.6.38/wacom_wac.c | 33 +++++++++++++++++++++++++++++++--
2.6.38/wacom_wac.h | 1 +
6 files changed, 96 insertions(+), 6 deletions(-)
diff --git a/2.6.30/wacom_wac.c b/2.6.30/wacom_wac.c
index bfefa5f..e133e29 100755
--- a/2.6.30/wacom_wac.c
+++ b/2.6.30/wacom_wac.c
@@ -645,7 +645,8 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
int idx = 0, result;
if (data[0] != WACOM_REPORT_PENABLED && data[0] !=
WACOM_REPORT_INTUOSREAD
- && data[0] != WACOM_REPORT_INTUOSWRITE && data[0] !=
WACOM_REPORT_INTUOSPAD) {
+ && data[0] != WACOM_REPORT_INTUOSWRITE && data[0] !=
WACOM_REPORT_INTUOSPAD
+ && data[0] != WACOM_REPORT_INTUOS5PAD) {
dbg("wacom_intuos_irq: received unknown report #%d", data[0]);
return 0;
}
@@ -655,7 +656,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
idx = data[1] & 0x01;
/* pad packets. Works as a second tool and is always in prox */
- if (data[0] == WACOM_REPORT_INTUOSPAD) {
+ if (data[0] == WACOM_REPORT_INTUOSPAD || data[0] ==
WACOM_REPORT_INTUOS5PAD) {
if (features->type >= INTUOS4S && features->type <= INTUOS4L) {
input_report_key(input, BTN_0, (data[2] & 0x01));
@@ -729,6 +730,34 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
input_report_key(input, wacom->tool[1], 0);
input_report_abs(input, ABS_MISC, 0);
}
+ } else if (features->type >= INTUOS5S && features->type <=
INTUOS5L) {
+ int i;
+
+ /* Touch ring mode switch has no capacitive sensor */
+ input_report_key(input, BTN_0, (data[3] & 0x01));
+
+ /* ExpressKeys on Intuos5 have a capacitive sensor in
+ * addition to the mechanical switch. Switch data is
+ * stored in data[4], capacitive data in data[5].
+ */
+ for (i = 0; i < 8; i++) {
+ input_report_key(input, BTN_1 + i, data[4] & (1
<< i));
+ }
+
+ if (data[2] & 0x80) {
+ input_report_abs(input, ABS_WHEEL, (data[2] &
0x7f));
+ } else {
+ /* Out of proximity, clear wheel value. */
+ input_report_abs(input, ABS_WHEEL, 0);
+ }
+
+ if (data[2] | (data[3] & 0x01) | data[4]) {
+ input_report_key(input, wacom->tool[1], 1);
+ input_report_abs(input, ABS_MISC,
PAD_DEVICE_ID);
+ } else {
+ input_report_key(input, wacom->tool[1], 0);
+ input_report_abs(input, ABS_MISC, 0);
+ }
} else {
if (features->type == WACOM_21UX2) {
input_report_key(input, BTN_0, (data[5] &
0x01));
diff --git a/2.6.30/wacom_wac.h b/2.6.30/wacom_wac.h
index 4c13d81..0d6c659 100755
--- a/2.6.30/wacom_wac.h
+++ b/2.6.30/wacom_wac.h
@@ -35,6 +35,7 @@
#define WACOM_REPORT_INTUOSREAD 5
#define WACOM_REPORT_INTUOSWRITE 6
#define WACOM_REPORT_INTUOSPAD 12
+#define WACOM_REPORT_INTUOS5PAD 3
#define WACOM_REPORT_TPC1FG 6
#define WACOM_REPORT_TPC2FG 13
diff --git a/2.6.36/wacom_wac.c b/2.6.36/wacom_wac.c
index 4d76e5f..ae090e5 100644
--- a/2.6.36/wacom_wac.c
+++ b/2.6.36/wacom_wac.c
@@ -483,7 +483,8 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
int idx = 0, result;
if (data[0] != WACOM_REPORT_PENABLED && data[0] !=
WACOM_REPORT_INTUOSREAD
- && data[0] != WACOM_REPORT_INTUOSWRITE && data[0] !=
WACOM_REPORT_INTUOSPAD) {
+ && data[0] != WACOM_REPORT_INTUOSWRITE && data[0] !=
WACOM_REPORT_INTUOSPAD
+ && data[0] != WACOM_REPORT_INTUOS5PAD) {
dbg("wacom_intuos_irq: received unknown report #%d", data[0]);
return 0;
}
@@ -493,7 +494,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
idx = data[1] & 0x01;
/* pad packets. Works as a second tool and is always in prox */
- if (data[0] == WACOM_REPORT_INTUOSPAD) {
+ if (data[0] == WACOM_REPORT_INTUOSPAD || data[0] ==
WACOM_REPORT_INTUOS5PAD) {
if (features->type >= INTUOS4S && features->type <= INTUOS4L) {
input_report_key(input, BTN_0, (data[2] & 0x01));
@@ -567,6 +568,34 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
input_report_key(input, wacom->tool[1], 0);
input_report_abs(input, ABS_MISC, 0);
}
+ } else if (features->type >= INTUOS5S && features->type <=
INTUOS5L) {
+ int i;
+
+ /* Touch ring mode switch has no capacitive sensor */
+ input_report_key(input, BTN_0, (data[3] & 0x01));
+
+ /* ExpressKeys on Intuos5 have a capacitive sensor in
+ * addition to the mechanical switch. Switch data is
+ * stored in data[4], capacitive data in data[5].
+ */
+ for (i = 0; i < 8; i++) {
+ input_report_key(input, BTN_1 + i, data[4] & (1
<< i));
+ }
+
+ if (data[2] & 0x80) {
+ input_report_abs(input, ABS_WHEEL, (data[2] &
0x7f));
+ } else {
+ /* Out of proximity, clear wheel value. */
+ input_report_abs(input, ABS_WHEEL, 0);
+ }
+
+ if (data[2] | (data[3] & 0x01) | data[4]) {
+ input_report_key(input, wacom->tool[1], 1);
+ input_report_abs(input, ABS_MISC,
PAD_DEVICE_ID);
+ } else {
+ input_report_key(input, wacom->tool[1], 0);
+ input_report_abs(input, ABS_MISC, 0);
+ }
} else {
if (features->type == WACOM_21UX2) {
input_report_key(input, BTN_0, (data[5] &
0x01));
diff --git a/2.6.36/wacom_wac.h b/2.6.36/wacom_wac.h
index 330d852..f8d9acb 100644
--- a/2.6.36/wacom_wac.h
+++ b/2.6.36/wacom_wac.h
@@ -36,6 +36,7 @@
#define WACOM_REPORT_INTUOSREAD 5
#define WACOM_REPORT_INTUOSWRITE 6
#define WACOM_REPORT_INTUOSPAD 12
+#define WACOM_REPORT_INTUOS5PAD 3
#define WACOM_REPORT_TPC1FG 6
#define WACOM_REPORT_TPCMT 13
#define WACOM_REPORT_TPCHID 15
diff --git a/2.6.38/wacom_wac.c b/2.6.38/wacom_wac.c
index 6fa8c89..900080c 100644
--- a/2.6.38/wacom_wac.c
+++ b/2.6.38/wacom_wac.c
@@ -484,7 +484,8 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
int idx = 0, result;
if (data[0] != WACOM_REPORT_PENABLED && data[0] !=
WACOM_REPORT_INTUOSREAD
- && data[0] != WACOM_REPORT_INTUOSWRITE && data[0] !=
WACOM_REPORT_INTUOSPAD) {
+ && data[0] != WACOM_REPORT_INTUOSWRITE && data[0] !=
WACOM_REPORT_INTUOSPAD
+ && data[0] != WACOM_REPORT_INTUOS5PAD) {
dbg("wacom_intuos_irq: received unknown report #%d", data[0]);
return 0;
}
@@ -494,7 +495,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
idx = data[1] & 0x01;
/* pad packets. Works as a second tool and is always in prox */
- if (data[0] == WACOM_REPORT_INTUOSPAD) {
+ if (data[0] == WACOM_REPORT_INTUOSPAD || data[0] ==
WACOM_REPORT_INTUOS5PAD) {
if (features->type >= INTUOS4S && features->type <= INTUOS4L) {
input_report_key(input, BTN_0, (data[2] & 0x01));
input_report_key(input, BTN_1, (data[3] & 0x01));
@@ -570,6 +571,34 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
input_report_key(input, wacom->tool[1], 0);
input_report_abs(input, ABS_MISC, 0);
}
+ } else if (features->type >= INTUOS5S && features->type <=
INTUOS5L) {
+ int i;
+
+ /* Touch ring mode switch has no capacitive sensor */
+ input_report_key(input, BTN_0, (data[3] & 0x01));
+
+ /* ExpressKeys on Intuos5 have a capacitive sensor in
+ * addition to the mechanical switch. Switch data is
+ * stored in data[4], capacitive data in data[5].
+ */
+ for (i = 0; i < 8; i++) {
+ input_report_key(input, BTN_1 + i, data[4] & (1
<< i));
+ }
+
+ if (data[2] & 0x80) {
+ input_report_abs(input, ABS_WHEEL, (data[2] &
0x7f));
+ } else {
+ /* Out of proximity, clear wheel value. */
+ input_report_abs(input, ABS_WHEEL, 0);
+ }
+
+ if (data[2] | (data[3] & 0x01) | data[4]) {
+ input_report_key(input, wacom->tool[1], 1);
+ input_report_abs(input, ABS_MISC,
PAD_DEVICE_ID);
+ } else {
+ input_report_key(input, wacom->tool[1], 0);
+ input_report_abs(input, ABS_MISC, 0);
+ }
} else {
if (features->type == WACOM_21UX2) {
input_report_key(input, BTN_0, (data[5] &
0x01));
diff --git a/2.6.38/wacom_wac.h b/2.6.38/wacom_wac.h
index 0cd65d0..fa8d9c7 100644
--- a/2.6.38/wacom_wac.h
+++ b/2.6.38/wacom_wac.h
@@ -37,6 +37,7 @@
#define WACOM_REPORT_INTUOSREAD 5
#define WACOM_REPORT_INTUOSWRITE 6
#define WACOM_REPORT_INTUOSPAD 12
+#define WACOM_REPORT_INTUOS5PAD 3
#define WACOM_REPORT_TPC1FG 6
#define WACOM_REPORT_TPC2FG 13
--
1.7.9.5
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel