Dnia 2011-10-21, piÄ… o godzinie 14:14 -0700, Ping Cheng pisze:
> On Fri, Oct 21, 2011 at 1:29 PM, Przemo Firszt <prz...@firszt.eu> wrote:
> > Verssion 3. The only difference is
> > __set_bit(INPUT_PROP_POINTER, input->propbit);
> > moved to "common" section of "probe" function.
>
> I don't think I have time to test Graphire WL. You can add my Acked-by
> when submitting to LKML-input.
>
> Thank you for the support.
Thanks Ping!
I hope that Graphire WL will work - the code is the same if I haven't
made any simple error.
Next part of the I4 WL driver attached - this time pen button reporting.
--
Przemo
>From 6d69cdcea2b0033dba0ebbaa249c66301d47af90 Mon Sep 17 00:00:00 2001
From: Przemo Firszt <prz...@firszt.eu>
Date: Sun, 23 Oct 2011 12:20:02 +0100
Subject: [PATCH] Add pen button reporting for Intuos4 WL (HID driver)
This patch adds pen button reporting for Ituos4 WL hid driver. It also moves
declaration of button reporting (BTN_STYLUS & BTN_STYLUS2) to section of code
common for Graphire and Intuos4 WL.
Signed-off-by: Przemo Firszt <prz...@firszt.eu>
---
drivers/hid/hid-wacom.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
index 70a021e..2955eed 100644
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -231,6 +231,8 @@ static void wacom_i4_parse_pen_report(struct wacom_data *wdata,
else
input_report_key(input, BTN_TOUCH, 0);
+ input_report_key(input, BTN_STYLUS, data[1] & 0x02);
+ input_report_key(input, BTN_STYLUS2, data[1] & 0x04);
input_report_key(input, wdata->tool, 1);
input_report_abs(input, ABS_X, x);
input_report_abs(input, ABS_Y, y);
@@ -483,6 +485,8 @@ static int wacom_probe(struct hid_device *hdev,
hidinput = list_entry(hdev->inputs.next, struct hid_input, list);
input = hidinput->input;
+ __set_bit(BTN_STYLUS, input->keybit);
+ __set_bit(BTN_STYLUS2, input->keybit);
__set_bit(BTN_TOOL_PEN, input->keybit);
__set_bit(BTN_TOOL_RUBBER, input->keybit);
__set_bit(BTN_TOUCH, input->keybit);
@@ -494,8 +498,6 @@ static int wacom_probe(struct hid_device *hdev,
case USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH:
/* Basics */
__set_bit(REL_WHEEL, input->relbit);
- __set_bit(BTN_STYLUS, input->keybit);
- __set_bit(BTN_STYLUS2, input->keybit);
__set_bit(BTN_LEFT, input->keybit);
__set_bit(BTN_RIGHT, input->keybit);
__set_bit(BTN_MIDDLE, input->keybit);
--
1.7.6
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel