linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix pad button definition in hid-wacom.c
@ 2010-01-03 18:46 Przemysław Firszt
  2010-01-04 11:24 ` Jiri Kosina
  0 siblings, 1 reply; 7+ messages in thread
From: Przemysław Firszt @ 2010-01-03 18:46 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: marcel, jkosina

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

Hi,
Please check attached patch and apply if it's possible.
The patch was also discussed here:
http://www.mail-archive.com/linuxwacom-devel@lists.sourceforge.net/msg00128.htm

--
Regards,
Przemo Firszt

[-- Attachment #2: 0001-Fix-pad-button-definition-in-hid-wacom.c.patch --]
[-- Type: text/x-patch, Size: 916 bytes --]

>From 63d3fd45f4ef9e02a1073f1c8b1adf226ac66cf3 Mon Sep 17 00:00:00 2001
From: Przemo Firszt <przemo@firszt.eu>
Date: Sun, 3 Jan 2010 18:31:31 +0000
Subject: [PATCH] Fix pad button definition in hid-wacom.c

This fix is required for xorg driver to recognise 2 pad buttons
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
---
 drivers/hid/hid-wacom.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
index 7475421..75ea66a 100644
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -196,6 +196,9 @@ static int wacom_probe(struct hid_device *hdev,
 	/* Pad */
 	input->evbit[0] |= BIT(EV_MSC);
 	input->mscbit[0] |= BIT(MSC_SERIAL);
+	set_bit(BTN_0, input->keybit);
+	set_bit(BTN_1, input->keybit);
+	set_bit(BTN_TOOL_FINGER, input->keybit);
 
 	/* Distance, rubber and mouse */
 	input->absbit[0] |= BIT(ABS_DISTANCE);
-- 
1.6.5.7


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

* Re: [PATCH] Fix pad button definition in hid-wacom.c
  2010-01-03 18:46 [PATCH] Fix pad button definition in hid-wacom.c Przemysław Firszt
@ 2010-01-04 11:24 ` Jiri Kosina
  2010-01-04 15:39   ` Bastien Nocera
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Kosina @ 2010-01-04 11:24 UTC (permalink / raw)
  To: Przemysław Firszt; +Cc: linux-bluetooth, Marcel Holtmann, Bastien Nocera

On Sun, 3 Jan 2010, Przemysław Firszt wrote:

> Please check attached patch and apply if it's possible.
> The patch was also discussed here:
> http://www.mail-archive.com/linuxwacom-devel@lists.sourceforge.net/msg00128.htm

Adding Bastien (the author of hid-wacom.c) to CC.

I have queued the patch in my tree, thanks.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

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

* Re: [PATCH] Fix pad button definition in hid-wacom.c
  2010-01-04 11:24 ` Jiri Kosina
@ 2010-01-04 15:39   ` Bastien Nocera
  2010-01-09 14:11     ` Przemysław Firszt
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien Nocera @ 2010-01-04 15:39 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Przemysław Firszt, linux-bluetooth, Marcel Holtmann

On Mon, 2010-01-04 at 12:24 +0100, Jiri Kosina wrote:
> On Sun, 3 Jan 2010, Przemysław Firszt wrote:
> 
> > Please check attached patch and apply if it's possible.
> > The patch was also discussed here:
> > http://www.mail-archive.com/linuxwacom-devel@lists.sourceforge.net/msg00128.htm
> 
> Adding Bastien (the author of hid-wacom.c) to CC.

I'm on the list already :)

> I have queued the patch in my tree, thanks.

Looks good, thanks for the patch!

Cheers

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

* Re: [PATCH] Fix pad button definition in hid-wacom.c
  2010-01-04 15:39   ` Bastien Nocera
@ 2010-01-09 14:11     ` Przemysław Firszt
  2010-01-09 14:16       ` Jiri Kosina
  0 siblings, 1 reply; 7+ messages in thread
From: Przemysław Firszt @ 2010-01-09 14:11 UTC (permalink / raw)
  To: Bastien Nocera
  Cc: Jiri Kosina, linux-bluetooth, Marcel Holtmann, Ping,
	Peter Hutterer

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

Dnia 2010-01-04, pon o godzinie 16:39 +0100, Bastien Nocera pisze:
> On Mon, 2010-01-04 at 12:24 +0100, Jiri Kosina wrote:
> > On Sun, 3 Jan 2010, Przemysław Firszt wrote:
> > 
> > > Please check attached patch and apply if it's possible.
> > > The patch was also discussed here:
> > > http://www.mail-archive.com/linuxwacom-devel@lists.sourceforge.net/msg00128.htm
> > 
> > Adding Bastien (the author of hid-wacom.c) to CC.
[..]
There is one more change required to get the pad buttons on wacom
bluetooth tablet fully working - see attached patch.
My main goal was to map pad buttons to Ctrl-Z and Ctrl-Y - (gimp
undo/redo) and now it works. 
After this:
xsetwacom --set "WACOM Pen Tablet pad" Button1 "core key ctrl z"
xsetwacom --set "WACOM Pen Tablet pad" Button2 "core key ctrl y"
I've got nicely working undo/redo in gimp.
--
Przemo




[-- Attachment #2: 0002-Add-BTN_TOOL_FINGER-input-report-when-reporting-a-pa.patch --]
[-- Type: text/x-patch, Size: 1027 bytes --]

>From 28feba89f364fc7ce0733ca9736b970bcdde7fd3 Mon Sep 17 00:00:00 2001
From: Przemo Firszt <przemo@firszt.eu>
Date: Sat, 9 Jan 2010 13:58:51 +0000
Subject: [PATCH 2/2] Add BTN_TOOL_FINGER input report when reporting a pad button

Without this patch xf86-input-wacom driver wasn't able to properly recognise
pad button events. It was also causing some problems with button mapping.
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
---
 drivers/hid/hid-wacom.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
index 75ea66a..12dcda5 100644
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -142,6 +142,7 @@ static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report,
 		wdata->butstate = rw;
 		input_report_key(input, BTN_0, rw & 0x02);
 		input_report_key(input, BTN_1, rw & 0x01);
+		input_report_key(input, BTN_TOOL_FINGER, 0xf0);
 		input_event(input, EV_MSC, MSC_SERIAL, 0xf0);
 		input_sync(input);
 	}
-- 
1.6.5.7


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

* Re: [PATCH] Fix pad button definition in hid-wacom.c
  2010-01-09 14:11     ` Przemysław Firszt
@ 2010-01-09 14:16       ` Jiri Kosina
  2010-01-10 18:35         ` Ping
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Kosina @ 2010-01-09 14:16 UTC (permalink / raw)
  To: Przemysław Firszt
  Cc: Bastien Nocera, linux-bluetooth, Marcel Holtmann, Ping,
	Peter Hutterer

On Sat, 9 Jan 2010, Przemysław Firszt wrote:

> There is one more change required to get the pad buttons on wacom
> bluetooth tablet fully working - see attached patch.

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

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

* Re: [PATCH] Fix pad button definition in hid-wacom.c
  2010-01-09 14:16       ` Jiri Kosina
@ 2010-01-10 18:35         ` Ping
  2010-01-12 13:36           ` Jiri Kosina
  0 siblings, 1 reply; 7+ messages in thread
From: Ping @ 2010-01-10 18:35 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Przemysław Firszt, Bastien Nocera, linux-bluetooth,
	Marcel Holtmann, Peter Hutterer

2010/1/9 Jiri Kosina <jkosina@suse.cz>:
> On Sat, 9 Jan 2010, Przemys=C5=82aw Firszt wrote:
>
>> There is one more change required to get the pad buttons on wacom
>> bluetooth tablet fully working - see attached patch.
>
> Applied, thanks.
>
> --
> Jiri Kosina
> SUSE Labs, Novell Inc.
>

The patch below is needed for Wacom X.Org driver to receive the proper
PAD button events.  It is based on Przemo's applied patch attached to
this email sting.

Signed-off-by: Ping Cheng <pingc@wacom.com>

--- hid-wacom.c_old	2010-01-10 10:25:48.236272275 -0800
+++ hid-wacom.c	2010-01-10 10:25:45.216272921 -0800
@@ -197,6 +197,9 @@
 	/* Pad */
 	input->evbit[0] |=3D BIT(EV_MSC);
 	input->mscbit[0] |=3D BIT(MSC_SERIAL);
+	set_bit(BTN_0, input->keybit);
+	set_bit(BTN_1, input->keybit);
+	set_bit(BTN_TOOL_FINGER, input->keybit);

 	/* Distance, rubber and mouse */
 	input->absbit[0] |=3D BIT(ABS_DISTANCE);

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

* Re: [PATCH] Fix pad button definition in hid-wacom.c
  2010-01-10 18:35         ` Ping
@ 2010-01-12 13:36           ` Jiri Kosina
  0 siblings, 0 replies; 7+ messages in thread
From: Jiri Kosina @ 2010-01-12 13:36 UTC (permalink / raw)
  To: Ping
  Cc: Przemysław Firszt, Bastien Nocera, linux-bluetooth,
	Marcel Holtmann, Peter Hutterer

On Sun, 10 Jan 2010, Ping wrote:

> >> There is one more change required to get the pad buttons on wacom
> >> bluetooth tablet fully working - see attached patch.
> 
> The patch below is needed for Wacom X.Org driver to receive the proper
> PAD button events.  It is based on Przemo's applied patch attached to
> this email sting.
> 
> Signed-off-by: Ping Cheng <pingc@wacom.com>
> 
> --- hid-wacom.c_old	2010-01-10 10:25:48.236272275 -0800
> +++ hid-wacom.c	2010-01-10 10:25:45.216272921 -0800
> @@ -197,6 +197,9 @@
>  	/* Pad */
>  	input->evbit[0] |= BIT(EV_MSC);
>  	input->mscbit[0] |= BIT(MSC_SERIAL);
> +	set_bit(BTN_0, input->keybit);
> +	set_bit(BTN_1, input->keybit);
> +	set_bit(BTN_TOOL_FINGER, input->keybit);
> 
>  	/* Distance, rubber and mouse */
>  	input->absbit[0] |= BIT(ABS_DISTANCE);

Hi,

thanks for the patch. Przemo has already submitted this exact fix already, 
and I have it queued in my tree.

Thanks,

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

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

end of thread, other threads:[~2010-01-12 13:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-03 18:46 [PATCH] Fix pad button definition in hid-wacom.c Przemysław Firszt
2010-01-04 11:24 ` Jiri Kosina
2010-01-04 15:39   ` Bastien Nocera
2010-01-09 14:11     ` Przemysław Firszt
2010-01-09 14:16       ` Jiri Kosina
2010-01-10 18:35         ` Ping
2010-01-12 13:36           ` Jiri Kosina

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).