* [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox
@ 2012-09-06 22:53 Jason Gerecke
2012-09-06 22:53 ` [PATCH 2/5] Input: wacom - handle split-sensor devices with internal hubs Jason Gerecke
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Jason Gerecke @ 2012-09-06 22:53 UTC (permalink / raw)
To: linux-input, dmitry.torokhov, pinglinux, chris; +Cc: Jason Gerecke
The ability to set the proximity flag should apply to any device
that has both pen and touch input. Rather than listing classes of
devices known to meet this criteria, simply filter on the quirk
defining all such devices.
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
---
drivers/input/tablet/wacom_wac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 532d067..a8bc6c9 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -326,7 +326,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
/* Enter report */
if ((data[1] & 0xfc) == 0xc0) {
- if (features->type >= INTUOS5S && features->type <= INTUOS5L)
+ if (features->quirks == WACOM_QUIRK_MULTI_INPUT)
wacom->shared->stylus_in_proximity = true;
/* serial number of the tool */
@@ -414,7 +414,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
/* Exit report */
if ((data[1] & 0xfe) == 0x80) {
- if (features->type >= INTUOS5S && features->type <= INTUOS5L)
+ if (features->quirks == WACOM_QUIRK_MULTI_INPUT)
wacom->shared->stylus_in_proximity = false;
/*
--
1.7.12
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/5] Input: wacom - handle split-sensor devices with internal hubs
2012-09-06 22:53 [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox Jason Gerecke
@ 2012-09-06 22:53 ` Jason Gerecke
2012-09-06 22:53 ` [PATCH 3/5] Input: wacom - Introduce wacom_fix_phy_from_hid Jason Gerecke
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Jason Gerecke @ 2012-09-06 22:53 UTC (permalink / raw)
To: linux-input, dmitry.torokhov, pinglinux, chris; +Cc: Jason Gerecke
Like our other pen-and-touch products, the Cintiq 24HD touch
needs data to be shared between its two sensors to facilitate
proximity-based palm rejection.
Unlike other tablets that report sensor data through separate
interfaces of the same USB device, the Cintiq 24HD touch has
separate USB devices that are connected to an internal USB hub.
This patch makes it possible to designate the USB VID/PID of
the other device so that the two may share data. To ensure
we don't accidentally link to a sensor from a physically separate
device (if several have been plugged in), we limit the search
to siblings (i.e., devices directly connected to the same
hub).
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 31 ++++++++++++++++++++++++++++++-
drivers/input/tablet/wacom_wac.c | 3 ++-
drivers/input/tablet/wacom_wac.h | 2 ++
3 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 0d3219f..d67a996 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -546,6 +546,29 @@ struct wacom_usbdev_data {
static LIST_HEAD(wacom_udev_list);
static DEFINE_MUTEX(wacom_udev_list_lock);
+static struct usb_device *wacom_get_sibling(struct usb_device *dev, int vendor, int product)
+{
+ struct usb_device **sibling;
+
+ if (vendor == 0 && product == 0)
+ return dev;
+
+ if (dev->parent == NULL)
+ return NULL;
+
+ sibling = dev->parent->children;
+ while (sibling != NULL && *sibling != NULL) {
+ struct usb_device_descriptor d = (*sibling)->descriptor;
+
+ if (d.idVendor == vendor && d.idProduct == product)
+ return *sibling;
+
+ sibling++;
+ }
+
+ return NULL;
+}
+
static struct wacom_usbdev_data *wacom_get_usbdev_data(struct usb_device *dev)
{
struct wacom_usbdev_data *data;
@@ -1190,13 +1213,19 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
strlcpy(wacom_wac->name, features->name, sizeof(wacom_wac->name));
if (features->quirks & WACOM_QUIRK_MULTI_INPUT) {
+ struct usb_device *other_dev;
+
/* Append the device type to the name */
strlcat(wacom_wac->name,
features->device_type == BTN_TOOL_PEN ?
" Pen" : " Finger",
sizeof(wacom_wac->name));
- error = wacom_add_shared_data(wacom_wac, dev);
+
+ other_dev = wacom_get_sibling(dev, features->oVid, features->oPid);
+ if (other_dev == NULL || wacom_get_usbdev_data(other_dev) == NULL)
+ other_dev = dev;
+ error = wacom_add_shared_data(wacom_wac, other_dev);
if (error)
goto fail3;
}
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index a8bc6c9..9f52ba0 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1327,7 +1327,8 @@ void wacom_setup_device_quirks(struct wacom_features *features)
/* these device have multiple inputs */
if (features->type >= WIRELESS ||
- (features->type >= INTUOS5S && features->type <= INTUOS5L))
+ (features->type >= INTUOS5S && features->type <= INTUOS5L) ||
+ (features->oVid && features->oPid))
features->quirks |= WACOM_QUIRK_MULTI_INPUT;
/* quirk for bamboo touch with 2 low res touches */
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
index 96c185c..3f926ec 100644
--- a/drivers/input/tablet/wacom_wac.h
+++ b/drivers/input/tablet/wacom_wac.h
@@ -109,6 +109,8 @@ struct wacom_features {
int distance_fuzz;
unsigned quirks;
unsigned touch_max;
+ int oVid;
+ int oPid;
};
struct wacom_shared {
--
1.7.12
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/5] Input: wacom - Introduce wacom_fix_phy_from_hid
2012-09-06 22:53 [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox Jason Gerecke
2012-09-06 22:53 ` [PATCH 2/5] Input: wacom - handle split-sensor devices with internal hubs Jason Gerecke
@ 2012-09-06 22:53 ` Jason Gerecke
2012-09-06 22:53 ` [PATCH 4/5] Input: wacom - Clean up wacom_query_tablet_data Jason Gerecke
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Jason Gerecke @ 2012-09-06 22:53 UTC (permalink / raw)
To: linux-input, dmitry.torokhov, pinglinux, chris; +Cc: Jason Gerecke
The Cintiq 24HD touch cannot use wacom_set_phy_from_res to determine
the physical size of the touch sensor since the pen and touch are
on separate USB devices. The physical size is, however, provided in
the HID descriptor, just scaled to a unit we don't use.
This patch introduces the function wacom_fix_phy_from_hid to let
us make use of the unit and exponent data provided by HID to set
the [xy]_phy variables to an appropriate value. This function
relies on a trimmed-down version of hidinput_calc_abs_res from
the hid-input.c.
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 69 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index d67a996..08ab0b0 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -172,6 +172,74 @@ static void wacom_close(struct input_dev *dev)
}
/*
+ * Calculate the resolution of the X or Y axis, given appropriate HID data.
+ * This function is little more than hidinput_calc_abs_res stripped down.
+ */
+static int wacom_calc_hid_res(int logical_extents, int physical_extents,
+ unsigned char unit, unsigned char exponent)
+{
+ int prev, unit_exponent;
+
+ /* Check if the extents are sane */
+ if (logical_extents <= 0 || physical_extents <= 0)
+ return 0;
+
+ /* Get signed value of nybble-sized twos-compliment exponent */
+ unit_exponent = exponent;
+ if (unit_exponent > 7)
+ unit_exponent -= 16;
+
+ /* Convert physical_extents to millimeters */
+ if (unit == 0x11) { /* If centimeters */
+ unit_exponent += 1;
+ } else if (unit == 0x13) { /* If inches */
+ prev = physical_extents;
+ physical_extents *= 254;
+ if (physical_extents < prev)
+ return 0;
+ unit_exponent -= 1;
+ } else {
+ return 0;
+ }
+
+ /* Apply negative unit exponent */
+ for (; unit_exponent < 0; unit_exponent++) {
+ prev = logical_extents;
+ logical_extents *= 10;
+ if (logical_extents < prev)
+ return 0;
+ }
+ /* Apply positive unit exponent */
+ for (; unit_exponent > 0; unit_exponent--) {
+ prev = physical_extents;
+ physical_extents *= 10;
+ if (physical_extents < prev)
+ return 0;
+ }
+
+ /* Calculate resolution */
+ return logical_extents / physical_extents;
+}
+
+/*
+ * The physical dimension specified by the HID descriptor is likely not in
+ * the "100th of a mm" units expected by wacom_calculate_touch_res. This
+ * function adjusts the value of [xy]_phy based on the unit and exponent
+ * provided by the HID descriptor. If an error occurs durring conversion
+ * (e.g. from the unit being left unspecified) [xy]_phy is not modified.
+ */
+static void wacom_fix_phy_from_hid(struct wacom_features *features)
+{
+ int xres = wacom_calc_hid_res(features->x_max, features->x_phy, features->unit, features->unitExpo);
+ int yres = wacom_calc_hid_res(features->y_max, features->y_phy, features->unit, features->unitExpo);
+
+ if (xres > 0 && yres > 0) {
+ features->x_phy = (100 * features->x_max) / xres;
+ features->y_phy = (100 * features->y_max) / yres;
+ }
+}
+
+/*
* Static values for max X/Y and resolution of Pen interface is stored in
* features. This mean physical size of active area can be computed.
* This is useful to do when Pen and Touch have same active area of tablet.
@@ -531,6 +599,7 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
error = wacom_parse_hid(intf, hid_desc, features);
if (error)
goto out;
+ wacom_fix_phy_from_hid(features);
out:
return error;
--
1.7.12
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/5] Input: wacom - Clean up wacom_query_tablet_data
2012-09-06 22:53 [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox Jason Gerecke
2012-09-06 22:53 ` [PATCH 2/5] Input: wacom - handle split-sensor devices with internal hubs Jason Gerecke
2012-09-06 22:53 ` [PATCH 3/5] Input: wacom - Introduce wacom_fix_phy_from_hid Jason Gerecke
@ 2012-09-06 22:53 ` Jason Gerecke
2012-09-06 22:53 ` [PATCH 5/5] Input: wacom - Add touch sensor support for Cintiq 24HD touch Jason Gerecke
2012-09-28 21:18 ` [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox Ping Cheng
4 siblings, 0 replies; 9+ messages in thread
From: Jason Gerecke @ 2012-09-06 22:53 UTC (permalink / raw)
To: linux-input, dmitry.torokhov, pinglinux, chris; +Cc: Jason Gerecke
Rewrites this function to be easier to read and understand. The new
function 'wacom_set_device_mode' now handles the grunt work of
assembling the proper feature report, sending it to the device,
and ensuring the setting "sticks".
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 74 +++++++++++++++++++---------------------
1 file changed, 35 insertions(+), 39 deletions(-)
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 08ab0b0..b34a92b 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -500,56 +500,52 @@ static int wacom_parse_hid(struct usb_interface *intf,
return result;
}
-static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_features *features)
+static int wacom_set_device_mode(struct usb_interface *intf, int report_id, int length, int mode)
{
unsigned char *rep_data;
- int limit = 0, report_id = 2;
- int error = -ENOMEM;
+ int error = -ENOMEM, limit = 0;
- rep_data = kmalloc(4, GFP_KERNEL);
+ rep_data = kzalloc(length, GFP_KERNEL);
if (!rep_data)
return error;
- /* ask to report Wacom data */
+ rep_data[0] = report_id;
+ rep_data[1] = mode;
+
+ do {
+ error = wacom_set_report(intf, WAC_HID_FEATURE_REPORT,
+ report_id, rep_data, length, 1);
+ if (error >= 0)
+ error = wacom_get_report(intf, WAC_HID_FEATURE_REPORT,
+ report_id, rep_data, length, 1);
+ } while ((error < 0 || rep_data[1] != mode) && limit++ < WAC_MSG_RETRIES);
+
+ kfree(rep_data);
+
+ return error < 0 ? error : 0;
+}
+
+/*
+ * Switch the tablet into its most-capable mode. Wacom tablets are
+ * typically configured to power-up in a mode which sends mouse-like
+ * reports to the OS. To get absolute position, pressure data, etc.
+ * from the tablet, it is necessary to switch the tablet out of this
+ * mode and into one which sends the full range of tablet data.
+ */
+static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_features *features)
+{
if (features->device_type == BTN_TOOL_FINGER) {
- /* if it is an MT Tablet PC touch */
if (features->type > TABLETPC) {
- do {
- rep_data[0] = 3;
- rep_data[1] = 4;
- rep_data[2] = 0;
- rep_data[3] = 0;
- report_id = 3;
- error = wacom_set_report(intf,
- WAC_HID_FEATURE_REPORT,
- report_id,
- rep_data, 4, 1);
- if (error >= 0)
- error = wacom_get_report(intf,
- WAC_HID_FEATURE_REPORT,
- report_id,
- rep_data, 4, 1);
- } while ((error < 0 || rep_data[1] != 4) &&
- limit++ < WAC_MSG_RETRIES);
+ /* MT Tablet PC touch */
+ return wacom_set_device_mode(intf, 3, 4, 4);
+ }
+ } else if (features->device_type == BTN_TOOL_PEN) {
+ if (features->type <= BAMBOO_PT && features->type != WIRELESS) {
+ return wacom_set_device_mode(intf, 2, 2, 2);
}
- } else if (features->type <= BAMBOO_PT &&
- features->type != WIRELESS &&
- features->device_type == BTN_TOOL_PEN) {
- do {
- rep_data[0] = 2;
- rep_data[1] = 2;
- error = wacom_set_report(intf, WAC_HID_FEATURE_REPORT,
- report_id, rep_data, 2, 1);
- if (error >= 0)
- error = wacom_get_report(intf,
- WAC_HID_FEATURE_REPORT,
- report_id, rep_data, 2, 1);
- } while ((error < 0 || rep_data[1] != 2) && limit++ < WAC_MSG_RETRIES);
}
- kfree(rep_data);
-
- return error < 0 ? error : 0;
+ return 0;
}
static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
--
1.7.12
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/5] Input: wacom - Add touch sensor support for Cintiq 24HD touch
2012-09-06 22:53 [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox Jason Gerecke
` (2 preceding siblings ...)
2012-09-06 22:53 ` [PATCH 4/5] Input: wacom - Clean up wacom_query_tablet_data Jason Gerecke
@ 2012-09-06 22:53 ` Jason Gerecke
2012-09-28 21:18 ` [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox Ping Cheng
4 siblings, 0 replies; 9+ messages in thread
From: Jason Gerecke @ 2012-09-06 22:53 UTC (permalink / raw)
To: linux-input, dmitry.torokhov, pinglinux, chris; +Cc: Jason Gerecke
Decode multitouch reports from the touch sensor of the Cintiq
24HD touch.
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 19 ++++++++-
drivers/input/tablet/wacom_wac.c | 84 +++++++++++++++++++++++++++++++++++++++-
drivers/input/tablet/wacom_wac.h | 3 ++
3 files changed, 103 insertions(+), 3 deletions(-)
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index b34a92b..e99f33f 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -389,7 +389,7 @@ static int wacom_parse_hid(struct usb_interface *intf,
features->pktlen = WACOM_PKGLEN_TPC2FG;
}
- if (features->type == MTSCREEN)
+ if (features->type == MTSCREEN || WACOM_24HDT)
features->pktlen = WACOM_PKGLEN_MTOUCH;
if (features->type == BAMBOO_PT) {
@@ -400,6 +400,14 @@ static int wacom_parse_hid(struct usb_interface *intf,
features->x_max =
get_unaligned_le16(&report[i + 8]);
i += 15;
+ } else if (features->type == WACOM_24HDT) {
+ features->x_max =
+ get_unaligned_le16(&report[i + 3]);
+ features->x_phy =
+ get_unaligned_le16(&report[i + 8]);
+ features->unit = report[i - 1];
+ features->unitExpo = report[i - 3];
+ i += 12;
} else {
features->x_max =
get_unaligned_le16(&report[i + 3]);
@@ -432,6 +440,12 @@ static int wacom_parse_hid(struct usb_interface *intf,
features->y_phy =
get_unaligned_le16(&report[i + 6]);
i += 7;
+ } else if (type == WACOM_24HDT) {
+ features->y_max =
+ get_unaligned_le16(&report[i + 3]);
+ features->y_phy =
+ get_unaligned_le16(&report[i - 2]);
+ i += 7;
} else if (type == BAMBOO_PT) {
features->y_phy =
get_unaligned_le16(&report[i + 3]);
@@ -539,6 +553,9 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
/* MT Tablet PC touch */
return wacom_set_device_mode(intf, 3, 4, 4);
}
+ else if (features->type == WACOM_24HDT) {
+ return wacom_set_device_mode(intf, 18, 3, 2);
+ }
} else if (features->device_type == BTN_TOOL_PEN) {
if (features->type <= BAMBOO_PT && features->type != WIRELESS) {
return wacom_set_device_mode(intf, 2, 2, 2);
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 9f52ba0..da9adee 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -801,6 +801,69 @@ static int find_slot_from_contactid(struct wacom_wac *wacom, int contactid)
return -1;
}
+static int int_dist(int x1, int y1, int x2, int y2)
+{
+ int x = x2 - x1;
+ int y = y2 - y1;
+ return int_sqrt(x*x + y*y);
+}
+
+static int wacom_24hdt_irq(struct wacom_wac *wacom)
+{
+ struct input_dev *input = wacom->input;
+ char *data = wacom->data;
+ int i;
+ int current_num_contacts = data[61];
+ int contacts_to_send = 0;
+
+ /*
+ * First packet resets the counter since only the first
+ * packet in series will have non-zero current_num_contacts.
+ */
+ if (current_num_contacts)
+ wacom->num_contacts_left = current_num_contacts;
+
+ /* There are at most 4 contacts per packet */
+ contacts_to_send = min(4, wacom->num_contacts_left);
+
+ for (i = 0; i < contacts_to_send; i++) {
+ int offset = (WACOM_BYTES_PER_24HDT_PACKET * i) + 1;
+ bool touch = data[offset] & 0x1 && !wacom->shared->stylus_in_proximity;
+ int id = data[offset + 1];
+ int slot = find_slot_from_contactid(wacom, id);
+
+ if (slot < 0)
+ continue;
+ input_mt_slot(input, slot);
+ input_mt_report_slot_state(input, MT_TOOL_FINGER, touch);
+
+ if (touch) {
+ int t_x = le16_to_cpup((__le16 *)&data[offset + 2]);
+ int c_x = le16_to_cpup((__le16 *)&data[offset + 4]);
+ int t_y = le16_to_cpup((__le16 *)&data[offset + 6]);
+ int c_y = le16_to_cpup((__le16 *)&data[offset + 8]);
+ int w = le16_to_cpup((__le16 *)&data[offset + 10]);
+ int h = le16_to_cpup((__le16 *)&data[offset + 12]);
+
+ input_report_abs(input, ABS_MT_POSITION_X, t_x);
+ input_report_abs(input, ABS_MT_POSITION_Y, t_y);
+ input_report_abs(input, ABS_MT_TOUCH_MAJOR, min(w,h));
+ input_report_abs(input, ABS_MT_WIDTH_MAJOR, min(w, h) + int_dist(t_x, t_y, c_x, c_y));
+ input_report_abs(input, ABS_MT_WIDTH_MINOR, min(w, h));
+ input_report_abs(input, ABS_MT_ORIENTATION, w > h);
+ }
+ wacom->slots[slot] = touch ? id : -1;
+ }
+
+ input_mt_report_pointer_emulation(input, true);
+
+ wacom->num_contacts_left -= contacts_to_send;
+ if (wacom->num_contacts_left <= 0)
+ wacom->num_contacts_left = 0;
+
+ return 1;
+}
+
static int wacom_mt_touch(struct wacom_wac *wacom)
{
struct input_dev *input = wacom->input;
@@ -1242,6 +1305,10 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)
sync = wacom_intuos_irq(wacom_wac);
break;
+ case WACOM_24HDT:
+ sync = wacom_24hdt_irq(wacom_wac);
+ break;
+
case INTUOS5S:
case INTUOS5:
case INTUOS5L:
@@ -1561,6 +1628,15 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
__set_bit(INPUT_PROP_POINTER, input_dev->propbit);
break;
+ case WACOM_24HDT:
+ if (features->device_type == BTN_TOOL_FINGER) {
+ input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, features->x_max, 0, 0);
+ input_set_abs_params(input_dev, ABS_MT_WIDTH_MAJOR, 0, features->x_max, 0, 0);
+ input_set_abs_params(input_dev, ABS_MT_WIDTH_MINOR, 0, features->y_max, 0, 0);
+ input_set_abs_params(input_dev, ABS_MT_ORIENTATION, 0, 1, 0, 0);
+ }
+ /* fall through */
+
case MTSCREEN:
if (features->device_type == BTN_TOOL_FINGER) {
wacom_wac->slots = kmalloc(features->touch_max *
@@ -1852,8 +1928,11 @@ static const struct wacom_features wacom_features_0xF4 =
{ "Wacom Cintiq 24HD", WACOM_PKGLEN_INTUOS, 104480, 65600, 2047,
63, WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
static const struct wacom_features wacom_features_0xF8 =
- { "Wacom Cintiq 24HD touch", WACOM_PKGLEN_INTUOS, 104480, 65600, 2047,
- 63, WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
+ { "Wacom Cintiq 24HD touch", WACOM_PKGLEN_INTUOS, 104480, 65600, 2047, /* Pen */
+ 63, WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, .oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf6 };
+static const struct wacom_features wacom_features_0xF6 =
+ { "Wacom Cintiq 24HD touch", .type = WACOM_24HDT, /* Touch */
+ .oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf8, .touch_max = 10 };
static const struct wacom_features wacom_features_0x3F =
{ "Wacom Cintiq 21UX", WACOM_PKGLEN_INTUOS, 87200, 65600, 1023,
63, CINTIQ, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
@@ -2096,6 +2175,7 @@ const struct usb_device_id wacom_ids[] = {
{ USB_DEVICE_WACOM(0x47) },
{ USB_DEVICE_WACOM(0xF4) },
{ USB_DEVICE_WACOM(0xF8) },
+ { USB_DEVICE_WACOM(0xF6) },
{ USB_DEVICE_WACOM(0xFA) },
{ USB_DEVICE_LENOVO(0x6004) },
{ }
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
index 3f926ec..345f1e7 100644
--- a/drivers/input/tablet/wacom_wac.h
+++ b/drivers/input/tablet/wacom_wac.h
@@ -29,6 +29,7 @@
/* wacom data size per MT contact */
#define WACOM_BYTES_PER_MT_PACKET 11
+#define WACOM_BYTES_PER_24HDT_PACKET 14
/* device IDs */
#define STYLUS_DEVICE_ID 0x02
@@ -49,6 +50,7 @@
#define WACOM_REPORT_TPCHID 15
#define WACOM_REPORT_TPCST 16
#define WACOM_REPORT_TPC1FGE 18
+#define WACOM_REPORT_24HDT 1
/* device quirks */
#define WACOM_QUIRK_MULTI_INPUT 0x0001
@@ -81,6 +83,7 @@ enum {
WACOM_MO,
WIRELESS,
BAMBOO_PT,
+ WACOM_24HDT,
TABLETPC, /* add new TPC below */
TABLETPCE,
TABLETPC2FG,
--
1.7.12
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox
2012-09-06 22:53 [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox Jason Gerecke
` (3 preceding siblings ...)
2012-09-06 22:53 ` [PATCH 5/5] Input: wacom - Add touch sensor support for Cintiq 24HD touch Jason Gerecke
@ 2012-09-28 21:18 ` Ping Cheng
2012-10-01 17:09 ` Jason Gerecke
4 siblings, 1 reply; 9+ messages in thread
From: Ping Cheng @ 2012-09-28 21:18 UTC (permalink / raw)
To: Jason Gerecke, Dmitry Torokhov; +Cc: linux-input, chris
On Thu, Sep 6, 2012 at 3:53 PM, Jason Gerecke <killertofu@gmail.com> wrote:
> The ability to set the proximity flag should apply to any device
> that has both pen and touch input. Rather than listing classes of
> devices known to meet this criteria, simply filter on the quirk
> defining all such devices.
>
> Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Tested-by: Ping Cheng <pingc@wacom.com> for the whole set.
Dmitry, do you have questions about this patchset and "input: wacom:
Report correct touch contact size for I5/Bamboo"? We hope they can be
merged soon since we have more patches coming.
Thank you.
Ping
> ---
> drivers/input/tablet/wacom_wac.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
> index 532d067..a8bc6c9 100644
> --- a/drivers/input/tablet/wacom_wac.c
> +++ b/drivers/input/tablet/wacom_wac.c
> @@ -326,7 +326,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
>
> /* Enter report */
> if ((data[1] & 0xfc) == 0xc0) {
> - if (features->type >= INTUOS5S && features->type <= INTUOS5L)
> + if (features->quirks == WACOM_QUIRK_MULTI_INPUT)
> wacom->shared->stylus_in_proximity = true;
>
> /* serial number of the tool */
> @@ -414,7 +414,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
>
> /* Exit report */
> if ((data[1] & 0xfe) == 0x80) {
> - if (features->type >= INTUOS5S && features->type <= INTUOS5L)
> + if (features->quirks == WACOM_QUIRK_MULTI_INPUT)
> wacom->shared->stylus_in_proximity = false;
>
> /*
> --
> 1.7.12
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox
2012-09-28 21:18 ` [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox Ping Cheng
@ 2012-10-01 17:09 ` Jason Gerecke
2012-10-04 7:25 ` Dmitry Torokhov
0 siblings, 1 reply; 9+ messages in thread
From: Jason Gerecke @ 2012-10-01 17:09 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Ping Cheng, linux-input, chris
On Fri, Sep 28, 2012 at 2:18 PM, Ping Cheng <pinglinux@gmail.com> wrote:
> On Thu, Sep 6, 2012 at 3:53 PM, Jason Gerecke <killertofu@gmail.com> wrote:
>> The ability to set the proximity flag should apply to any device
>> that has both pen and touch input. Rather than listing classes of
>> devices known to meet this criteria, simply filter on the quirk
>> defining all such devices.
>>
>> Signed-off-by: Jason Gerecke <killertofu@gmail.com>
>
> Tested-by: Ping Cheng <pingc@wacom.com> for the whole set.
>
> Dmitry, do you have questions about this patchset and "input: wacom:
> Report correct touch contact size for I5/Bamboo"? We hope they can be
> merged soon since we have more patches coming.
>
> Thank you.
>
> Ping
>
The 24HD touch patches from September 6th as well ("Input: wacom - Add
touch sensor support for Cintiq 24HD touch"). I was hoping to get them
accepted before yesterday's 3.7 merge window opened.
Jason
---
When you're rife with devastation / There's a simple explanation:
You're a toymaker's creation / Trapped inside a crystal ball.
And whichever way he tilts it / Know that we must be resilient
We won't let them break our spirits / As we sing our silly song.
>> ---
>> drivers/input/tablet/wacom_wac.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
>> index 532d067..a8bc6c9 100644
>> --- a/drivers/input/tablet/wacom_wac.c
>> +++ b/drivers/input/tablet/wacom_wac.c
>> @@ -326,7 +326,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
>>
>> /* Enter report */
>> if ((data[1] & 0xfc) == 0xc0) {
>> - if (features->type >= INTUOS5S && features->type <= INTUOS5L)
>> + if (features->quirks == WACOM_QUIRK_MULTI_INPUT)
>> wacom->shared->stylus_in_proximity = true;
>>
>> /* serial number of the tool */
>> @@ -414,7 +414,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
>>
>> /* Exit report */
>> if ((data[1] & 0xfe) == 0x80) {
>> - if (features->type >= INTUOS5S && features->type <= INTUOS5L)
>> + if (features->quirks == WACOM_QUIRK_MULTI_INPUT)
>> wacom->shared->stylus_in_proximity = false;
>>
>> /*
>> --
>> 1.7.12
>>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox
2012-10-01 17:09 ` Jason Gerecke
@ 2012-10-04 7:25 ` Dmitry Torokhov
2012-10-05 22:26 ` Jason Gerecke
0 siblings, 1 reply; 9+ messages in thread
From: Dmitry Torokhov @ 2012-10-04 7:25 UTC (permalink / raw)
To: Jason Gerecke; +Cc: Ping Cheng, linux-input, chris
Hi Jason,
On Mon, Oct 01, 2012 at 10:09:24AM -0700, Jason Gerecke wrote:
> On Fri, Sep 28, 2012 at 2:18 PM, Ping Cheng <pinglinux@gmail.com> wrote:
> > On Thu, Sep 6, 2012 at 3:53 PM, Jason Gerecke <killertofu@gmail.com> wrote:
> >> The ability to set the proximity flag should apply to any device
> >> that has both pen and touch input. Rather than listing classes of
> >> devices known to meet this criteria, simply filter on the quirk
> >> defining all such devices.
> >>
> >> Signed-off-by: Jason Gerecke <killertofu@gmail.com>
> >
> > Tested-by: Ping Cheng <pingc@wacom.com> for the whole set.
> >
> > Dmitry, do you have questions about this patchset and "input: wacom:
> > Report correct touch contact size for I5/Bamboo"? We hope they can be
> > merged soon since we have more patches coming.
> >
> > Thank you.
> >
> > Ping
> >
> The 24HD touch patches from September 6th as well ("Input: wacom - Add
> touch sensor support for Cintiq 24HD touch"). I was hoping to get them
> accepted before yesterday's 3.7 merge window opened.
>
Could you please take a peek at my 'next' branch and see if anything
wacom-related is missing?
Thanks!
--
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox
2012-10-04 7:25 ` Dmitry Torokhov
@ 2012-10-05 22:26 ` Jason Gerecke
0 siblings, 0 replies; 9+ messages in thread
From: Jason Gerecke @ 2012-10-05 22:26 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Ping Cheng, linux-input, chris
On Thu, Oct 4, 2012 at 12:25 AM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> Hi Jason,
>
> On Mon, Oct 01, 2012 at 10:09:24AM -0700, Jason Gerecke wrote:
>> On Fri, Sep 28, 2012 at 2:18 PM, Ping Cheng <pinglinux@gmail.com> wrote:
>> > On Thu, Sep 6, 2012 at 3:53 PM, Jason Gerecke <killertofu@gmail.com> wrote:
>> >> The ability to set the proximity flag should apply to any device
>> >> that has both pen and touch input. Rather than listing classes of
>> >> devices known to meet this criteria, simply filter on the quirk
>> >> defining all such devices.
>> >>
>> >> Signed-off-by: Jason Gerecke <killertofu@gmail.com>
>> >
>> > Tested-by: Ping Cheng <pingc@wacom.com> for the whole set.
>> >
>> > Dmitry, do you have questions about this patchset and "input: wacom:
>> > Report correct touch contact size for I5/Bamboo"? We hope they can be
>> > merged soon since we have more patches coming.
>> >
>> > Thank you.
>> >
>> > Ping
>> >
>> The 24HD touch patches from September 6th as well ("Input: wacom - Add
>> touch sensor support for Cintiq 24HD touch"). I was hoping to get them
>> accepted before yesterday's 3.7 merge window opened.
>>
>
> Could you please take a peek at my 'next' branch and see if anything
> wacom-related is missing?
>
> Thanks!
>
> --
> Dmitry
That appears to be everything I had outstanding. I'll rewrite and
resubmit the two Cintiq patches you had to drop due to merge issues.
Jason
---
When you're rife with devastation / There's a simple explanation:
You're a toymaker's creation / Trapped inside a crystal ball.
And whichever way he tilts it / Know that we must be resilient
We won't let them break our spirits / As we sing our silly song.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-10-05 22:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-06 22:53 [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox Jason Gerecke
2012-09-06 22:53 ` [PATCH 2/5] Input: wacom - handle split-sensor devices with internal hubs Jason Gerecke
2012-09-06 22:53 ` [PATCH 3/5] Input: wacom - Introduce wacom_fix_phy_from_hid Jason Gerecke
2012-09-06 22:53 ` [PATCH 4/5] Input: wacom - Clean up wacom_query_tablet_data Jason Gerecke
2012-09-06 22:53 ` [PATCH 5/5] Input: wacom - Add touch sensor support for Cintiq 24HD touch Jason Gerecke
2012-09-28 21:18 ` [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox Ping Cheng
2012-10-01 17:09 ` Jason Gerecke
2012-10-04 7:25 ` Dmitry Torokhov
2012-10-05 22:26 ` Jason Gerecke
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.