Re: [PATCH 1/1] Input: hanwang - add support for Art Master II tablet

From
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date
2012-07-10 06:42:39
Reply to
weixing, 2012-06-29
Hi,

On Fri, Jun 29, 2012 at 10:14:06PM +0800, weixing wrote:
quoted hunk ↗ jump to hunk
 
 	switch (data[0]) {
 	case 0x02:	/* data packet */
 		switch (data[1]) {
 		case 0x80:	/* tool prox out */
-			hanwang->current_id = 0;
-			input_report_key(input_dev, hanwang->current_tool, 0);
+			if (type != HANWANG_ART_MASTER_II) {
+				hanwang->current_id = 0;
+				input_report_key(input_dev,
+					hanwang->current_tool, 0);
+			}
+			break;
+		case 0x00:	/* artmaster ii pen leave */
+			if (type == HANWANG_ART_MASTER_II) {
+				hanwang->current_id = 0;
+				input_report_key(input_dev,
+					hanwang->current_tool, 0);
+			}
 			break;
OK, so this will ignore 0x02 0x80 reports on HANWANG_ART_MASTER_II and
0x02 0x00 reports on other tablets. I just want to make sure that was
the intention of the patch.

Thanks.

-- 
Dmitry
Thread (3 messages) 3 messages, 2 authors, last reply 2012-07-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help