linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 2.4.19-pre8  Fix for Intuos tablet in wacom.c
@ 2002-05-14  8:31 Christer Nilsson
  2002-05-14 15:37 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Christer Nilsson @ 2002-05-14  8:31 UTC (permalink / raw)
  To: greg; +Cc: Linux-Kernel


The changes between 2.4.19-pre7 and 2.4.18-pre8 broke the Intuos part in
wacom.c
This will fix it.

--- linux/drivers/usb/wacom.c.org	Tue May 14 00:40:12 2002
+++ linux/drivers/usb/wacom.c	Tue May 14 00:41:31 2002
@@ -288,8 +288,8 @@
 	x = ((__u32)data[2] << 8) | data[3];
 	y = ((__u32)data[4] << 8) | data[5];

-	input_report_abs(dev, ABS_X, wacom->x);
-	input_report_abs(dev, ABS_Y, wacom->y);
+	input_report_abs(dev, ABS_X, wacom->x = x);
+	input_report_abs(dev, ABS_Y, wacom->y = y);
 	input_report_abs(dev, ABS_DISTANCE, data[9] >> 4);

 	if ((data[1] & 0xb8) == 0xa0) {						/* general pen packet */


Christer Nilsson



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] 2.4.19-pre8  Fix for Intuos tablet in wacom.c
  2002-05-14  8:31 [PATCH] 2.4.19-pre8 Fix for Intuos tablet in wacom.c Christer Nilsson
@ 2002-05-14 15:37 ` Greg KH
  2002-05-14 18:56   ` Christer Nilsson
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2002-05-14 15:37 UTC (permalink / raw)
  To: Christer Nilsson, lepied; +Cc: Linux-Kernel

On Tue, May 14, 2002 at 10:31:45AM +0200, Christer Nilsson wrote:
> 
> The changes between 2.4.19-pre7 and 2.4.18-pre8 broke the Intuos part in
> wacom.c
> This will fix it.
> 
> --- linux/drivers/usb/wacom.c.org	Tue May 14 00:40:12 2002
> +++ linux/drivers/usb/wacom.c	Tue May 14 00:41:31 2002
> @@ -288,8 +288,8 @@
>  	x = ((__u32)data[2] << 8) | data[3];
>  	y = ((__u32)data[4] << 8) | data[5];
> 
> -	input_report_abs(dev, ABS_X, wacom->x);
> -	input_report_abs(dev, ABS_Y, wacom->y);
> +	input_report_abs(dev, ABS_X, wacom->x = x);
> +	input_report_abs(dev, ABS_Y, wacom->y = y);
>  	input_report_abs(dev, ABS_DISTANCE, data[9] >> 4);
> 
>  	if ((data[1] & 0xb8) == 0xa0) {						/* general pen packet */
> 

Can you ask lepied@xfree86.org if this will break anything else, as that
change was in his patch that is found at:
	http://people.mandrakesoft.com/~flepied/projects/wacom/

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] 2.4.19-pre8  Fix for Intuos tablet in wacom.c
  2002-05-14 15:37 ` Greg KH
@ 2002-05-14 18:56   ` Christer Nilsson
  2002-05-15  2:46     ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Christer Nilsson @ 2002-05-14 18:56 UTC (permalink / raw)
  To: Greg KH, lepied; +Cc: Linux-Kernel

Hi Frederic.

Can you take a look at this?

I've looked at the code at
http://people.mandrakesoft.com/~flepied/projects/wacom/ and found that
there's a couple of lines missing in the kernel driver. It seems that a
smoothing algorithm is left out
in the kernel source. My patch just circumvents that.

Christer Nilsson

> -----Original Message-----
> From: Greg KH [mailto:greg@kroah.com]
> Sent: Tuesday, May 14, 2002 5:38 PM
> To: Christer Nilsson; lepied@xfree86.org
> Cc: Linux-Kernel
> Subject: Re: [PATCH] 2.4.19-pre8 Fix for Intuos tablet in wacom.c
>
>
> On Tue, May 14, 2002 at 10:31:45AM +0200, Christer Nilsson wrote:
> >
> > The changes between 2.4.19-pre7 and 2.4.18-pre8 broke the Intuos part in
> > wacom.c
> > This will fix it.
> >
> > --- linux/drivers/usb/wacom.c.org	Tue May 14 00:40:12 2002
> > +++ linux/drivers/usb/wacom.c	Tue May 14 00:41:31 2002
> > @@ -288,8 +288,8 @@
> >  	x = ((__u32)data[2] << 8) | data[3];
> >  	y = ((__u32)data[4] << 8) | data[5];
> >
> > -	input_report_abs(dev, ABS_X, wacom->x);
> > -	input_report_abs(dev, ABS_Y, wacom->y);
> > +	input_report_abs(dev, ABS_X, wacom->x = x);
> > +	input_report_abs(dev, ABS_Y, wacom->y = y);
> >  	input_report_abs(dev, ABS_DISTANCE, data[9] >> 4);
> >
> >  	if ((data[1] & 0xb8) == 0xa0) {
> 	/* general pen packet */
> >
>
> Can you ask lepied@xfree86.org if this will break anything else, as that
> change was in his patch that is found at:
> 	http://people.mandrakesoft.com/~flepied/projects/wacom/
>
> thanks,
>
> greg k-h
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] 2.4.19-pre8  Fix for Intuos tablet in wacom.c
  2002-05-14 18:56   ` Christer Nilsson
@ 2002-05-15  2:46     ` Greg KH
  2002-05-15  8:54       ` Christer Nilsson
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2002-05-15  2:46 UTC (permalink / raw)
  To: Christer Nilsson; +Cc: lepied, Linux-Kernel

On Tue, May 14, 2002 at 08:56:14PM +0200, Christer Nilsson wrote:
> Hi Frederic.
> 
> Can you take a look at this?
> 
> I've looked at the code at
> http://people.mandrakesoft.com/~flepied/projects/wacom/ and found that
> there's a couple of lines missing in the kernel driver. It seems that a
> smoothing algorithm is left out
> in the kernel source. My patch just circumvents that.

I took out the smoothing algorithm, as it does not belong in the kernel.
That kind of stuff (filters, etc.) belongs in userspace.

Did my removing it break the current driver accidentally?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] 2.4.19-pre8  Fix for Intuos tablet in wacom.c
  2002-05-15  2:46     ` Greg KH
@ 2002-05-15  8:54       ` Christer Nilsson
  2002-05-16 22:52         ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Christer Nilsson @ 2002-05-15  8:54 UTC (permalink / raw)
  To: Greg KH; +Cc: lepied, Linux-Kernel

[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]

Yes, when you removed the smoothing algorithm you forgot to make
the change my previous patch fixed. Anyway, I took a look at the code
and found that it could be cleaned up a little.
This patch works for me, but I can only test it with an Intuos tablet
although it should not break anything.

Christer Nilsson

> -----Original Message-----
> From: Greg KH [mailto:greg@kroah.com]
> Sent: Wednesday, May 15, 2002 4:47 AM
> To: Christer Nilsson
> Cc: lepied@xfree86.org; Linux-Kernel
> Subject: Re: [PATCH] 2.4.19-pre8 Fix for Intuos tablet in wacom.c
> 
> 
> On Tue, May 14, 2002 at 08:56:14PM +0200, Christer Nilsson wrote:
> > Hi Frederic.
> > 
> > Can you take a look at this?
> > 
> > I've looked at the code at
> > http://people.mandrakesoft.com/~flepied/projects/wacom/ and found that
> > there's a couple of lines missing in the kernel driver. It seems that a
> > smoothing algorithm is left out
> > in the kernel source. My patch just circumvents that.
> 
> I took out the smoothing algorithm, as it does not belong in the kernel.
> That kind of stuff (filters, etc.) belongs in userspace.
> 
> Did my removing it break the current driver accidentally?
> 
> thanks,
> 
> greg k-h
> 

[-- Attachment #2: wacom.diff --]
[-- Type: application/octet-stream, Size: 1572 bytes --]

--- /usr/src/linux-2.4.19-pre8-ac2/drivers/usb/wacom.c.org	Wed May 15 10:28:42 2002
+++ /usr/src/linux-2.4.19-pre8-ac2/drivers/usb/wacom.c	Wed May 15 10:32:18 2002
@@ -111,7 +111,6 @@
 	struct wacom_features *features;
 	int tool[2];
 	int open;
-	int x, y;
 	__u32 serial[2];
 };
 
@@ -209,16 +208,16 @@
 			input_report_abs(dev, ABS_DISTANCE, data[7]);
 			input_report_rel(dev, REL_WHEEL, (signed char) data[6]);
 
-			input_report_abs(dev, ABS_X, wacom->x = x);
-			input_report_abs(dev, ABS_Y, wacom->y = y);
+			input_report_abs(dev, ABS_X, x);
+			input_report_abs(dev, ABS_Y, y);
 
 			input_event(dev, EV_MSC, MSC_SERIAL, data[1] & 0x01);
 			return;
 	}
 
 	if (data[1] & 0x80) {
-		input_report_abs(dev, ABS_X, wacom->x = x);
-		input_report_abs(dev, ABS_Y, wacom->y = y);
+		input_report_abs(dev, ABS_X, x);
+		input_report_abs(dev, ABS_Y, y);
 	}
 
 	input_report_abs(dev, ABS_PRESSURE, data[6] | ((__u32)data[7] << 8));
@@ -236,7 +235,6 @@
 	struct input_dev *dev = &wacom->dev;
 	unsigned int t;
 	int idx;
-	int x, y; 
 
 	if (urb->status) return;
 
@@ -285,11 +283,8 @@
 		return;
 	}
 
-	x = ((__u32)data[2] << 8) | data[3];
-	y = ((__u32)data[4] << 8) | data[5];
-	
-	input_report_abs(dev, ABS_X, wacom->x);
-	input_report_abs(dev, ABS_Y, wacom->y);
+	input_report_abs(dev, ABS_X, ((__u32)data[2] << 8) | data[3]);
+	input_report_abs(dev, ABS_Y, ((__u32)data[4] << 8) | data[5]);
 	input_report_abs(dev, ABS_DISTANCE, data[9] >> 4);
 	
 	if ((data[1] & 0xb8) == 0xa0) {						/* general pen packet */

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] 2.4.19-pre8  Fix for Intuos tablet in wacom.c
  2002-05-15  8:54       ` Christer Nilsson
@ 2002-05-16 22:52         ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2002-05-16 22:52 UTC (permalink / raw)
  To: Christer Nilsson; +Cc: lepied, Linux-Kernel

On Wed, May 15, 2002 at 10:54:18AM +0200, Christer Nilsson wrote:
> Yes, when you removed the smoothing algorithm you forgot to make
> the change my previous patch fixed. Anyway, I took a look at the code
> and found that it could be cleaned up a little.
> This patch works for me, but I can only test it with an Intuos tablet
> although it should not break anything.

Thanks, I've added this to my tree, and I'll send it out in the next
round of patches.

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-05-16 22:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-14  8:31 [PATCH] 2.4.19-pre8 Fix for Intuos tablet in wacom.c Christer Nilsson
2002-05-14 15:37 ` Greg KH
2002-05-14 18:56   ` Christer Nilsson
2002-05-15  2:46     ` Greg KH
2002-05-15  8:54       ` Christer Nilsson
2002-05-16 22:52         ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).