Setting the bit for SW_MUTE_DEVICE on kernels which do not have
SW_MUTE_DEVICE declared in input.h (prior to 3.13), causes these
devices' touch interfaces not to work.
Fixes: 7d13c26dd972 ("Backport support for the touch on/off switch").
Signed-off-by: Aaron Armstrong Skomra<[email protected]>
---
1. Does INTUOSHT have a touch switch? Maybe the check for BTN_TOOL_DOUBLETAP
excludes INTUOSHT right after we catch its case.
2. Does TABLETPC somehow need this commit to disable touch? I don't think it
could be using this non-existant constant, but I don't know which devices
TABLETPC applies to etc. On the Intuos Pro 2 and Intuos (CTH-680) this switch
is purely the reporting of the switch (the hardware disables the touch) so
removing our attempt at reporting the switch is of minor consequence.
3. Why was SW_MUTE_DEVICE orignally backported? My guess was that it was to
remove differences between each of our kernel directories. But it could be for
some other reason that I don't know of, in that case I will be missing
something here.
4. My guess is that SW_MUTE_DEVICE is supported in RHEL 7 (this bug was found
on RHEL 6) and that this code was tested against it, which is why we didn't
catch this. ie RHEL probably added SW_MUTE_DEVICE to their kernel. It could
also be that later input subsystems fail more gracefully when they recieve a
"__set_bit" that they are unfamiliar with, I'm not sure if we want to find
supported vanilla versions of these older kernels to test against. Also, I
have no idea how to check RHEL 7 source or if that's possible. If necessary we
can either revise this commit to check for RHEL 7 or come back and do that at a
later date for this event which again is of minor importance.
2.6.32/wacom_wac.c | 3 ---
2.6.38/wacom_wac.c | 3 ---
3.7/wacom_wac.c | 3 ---
3 files changed, 9 deletions(-)
diff --git a/2.6.32/wacom_wac.c b/2.6.32/wacom_wac.c
index 9f9899917a41..98589bea8f17 100644
--- a/2.6.32/wacom_wac.c
+++ b/2.6.32/wacom_wac.c
@@ -2276,7 +2276,6 @@ void wacom_setup_input_capabilities(struct input_dev
*input_dev,
__set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit);
input_dev->evbit[0] |= BIT_MASK(EV_SW);
- __set_bit(SW_MUTE_DEVICE, input_dev->swbit);
wacom_wac->shared->has_mute_touch_switch = true;
} else {
__set_bit(BTN_STYLUS3, input_dev->keybit);
@@ -2351,7 +2350,6 @@ void wacom_setup_input_capabilities(struct input_dev
*input_dev,
if ((input_dev->id.product >= 0x353 &&
input_dev->id.product <= 0x356)) {
input_dev->evbit[0] |= BIT_MASK(EV_SW);
- __set_bit(SW_MUTE_DEVICE, input_dev->swbit);
wacom_wac->shared->has_mute_touch_switch = true;
wacom_wac->shared->is_touch_on = true;
}
@@ -2394,7 +2392,6 @@ void wacom_setup_input_capabilities(struct input_dev
*input_dev,
if (features->touch_max &&
features->device_type == BTN_TOOL_DOUBLETAP) {
input_dev->evbit[0] |= BIT_MASK(EV_SW);
- __set_bit(SW_MUTE_DEVICE, input_dev->swbit);
wacom_wac->shared->has_mute_touch_switch = true;
}
/* fall through */
diff --git a/2.6.38/wacom_wac.c b/2.6.38/wacom_wac.c
index e0b5af1fc850..858602daf993 100644
--- a/2.6.38/wacom_wac.c
+++ b/2.6.38/wacom_wac.c
@@ -2539,7 +2539,6 @@ int wacom_setup_input_capabilities(struct input_dev
*input_dev,
}
else {
input_dev->evbit[0] |= BIT_MASK(EV_SW);
- __set_bit(SW_MUTE_DEVICE, input_dev->swbit);
wacom_wac->shared->has_mute_touch_switch = true;
}
err = wacom_create_slots(wacom_wac);
@@ -2647,7 +2646,6 @@ int wacom_setup_input_capabilities(struct input_dev
*input_dev,
if ((features->device_type == BTN_TOOL_FINGER) &&
(input_dev->id.product >= 0x353 && input_dev->id.product <=
0x356)) {
input_dev->evbit[0] |= BIT_MASK(EV_SW);
- __set_bit(SW_MUTE_DEVICE, input_dev->swbit);
wacom_wac->shared->has_mute_touch_switch = true;
wacom_wac->shared->is_touch_on = true;
}
@@ -2693,7 +2691,6 @@ int wacom_setup_input_capabilities(struct input_dev
*input_dev,
if (features->touch_max &&
features->device_type == BTN_TOOL_FINGER) {
input_dev->evbit[0] |= BIT_MASK(EV_SW);
- __set_bit(SW_MUTE_DEVICE, input_dev->swbit);
wacom_wac->shared->has_mute_touch_switch = true;
}
/* fall through */
diff --git a/3.7/wacom_wac.c b/3.7/wacom_wac.c
index c91093e13de3..42b2050eb1e4 100644
--- a/3.7/wacom_wac.c
+++ b/3.7/wacom_wac.c
@@ -2511,7 +2511,6 @@ int wacom_setup_input_capabilities(struct input_dev
*input_dev,
}
else {
input_dev->evbit[0] |= BIT_MASK(EV_SW);
- __set_bit(SW_MUTE_DEVICE, input_dev->swbit);
wacom_wac->shared->has_mute_touch_switch = true;
}
/* fall through */
@@ -2592,7 +2591,6 @@ int wacom_setup_input_capabilities(struct input_dev
*input_dev,
if ((features->device_type == BTN_TOOL_FINGER) &&
(input_dev->id.product >= 0x353 && input_dev->id.product <=
0x356)) {
input_dev->evbit[0] |= BIT_MASK(EV_SW);
- __set_bit(SW_MUTE_DEVICE, input_dev->swbit);
wacom_wac->shared->has_mute_touch_switch = true;
wacom_wac->shared->is_touch_on = true;
}
@@ -2638,7 +2636,6 @@ int wacom_setup_input_capabilities(struct input_dev
*input_dev,
if (features->touch_max &&
features->device_type == BTN_TOOL_FINGER) {
input_dev->evbit[0] |= BIT_MASK(EV_SW);
- __set_bit(SW_MUTE_DEVICE, input_dev->swbit);
wacom_wac->shared->has_mute_touch_switch = true;
}
/* fall through */
--
2.7.4
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel