Re: [PATCH for 3.14.x v2] HID: wacom: Report ABS_MISC event for Cintiq Companion Hybrid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 02, 2015 at 12:13:14PM -0800, Jason Gerecke wrote:
> [ Upstream commit 33e5df0e0e32027866e9fb00451952998fc957f2 ]
> 
> It appears that the Cintiq Companion Hybrid does not send an ABS_MISC event to
> userspace when any of its ExpressKeys are pressed. This is not strictly
> necessary now that the pad exists on its own device, but should be fixed for
> consistency's sake.
> 
> Traditionally both the stylus and pad shared the same device node, and
> xf86-input-wacom would use ABS_MISC for disambiguation. Not sending this causes
> the Hybrid to behave incorrectly with xf86-input-wacom beginning with its
> 8f44f3 commit.
> 
> Signed-off-by: Jason Gerecke <killertofu@xxxxxxxxx>
> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx>
> Signed-off-by: Jiri Kosina <jkosina@xxxxxxx>
> [killertofu@xxxxxxxxx: ported to drivers/input/tablet/wacom_wac.c]
> Signed-off-by: Jason Gerecke <killertofu@xxxxxxxxx>
> ---
> Note for stable maintainers: "Traditionally" above means "prior to Linux 3.17".
> Support for this device was added in 3.13, so the 3.14 longterm is affected.
> The current "stable" is unaffected since it is based on 3.18.
>

Thank you, I'll queue this backport for 3.16 kernel as well.

Cheers,
--
Luís

> V2:
>  * Updated S-O-B chain to reflect that the upstream patch has been
>    minimally modified (port from drivers/hid to drivers/input)
>  * Added missing paren which escaped me durring the port.
> 
>  drivers/input/tablet/wacom_wac.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
> index 05f371d..d4b0a31 100644
> --- a/drivers/input/tablet/wacom_wac.c
> +++ b/drivers/input/tablet/wacom_wac.c
> @@ -700,6 +700,12 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
>  			input_report_key(input, BTN_7, (data[4] & 0x40));  /* Left   */
>  			input_report_key(input, BTN_8, (data[4] & 0x80));  /* Down   */
>  			input_report_key(input, BTN_0, (data[3] & 0x01));  /* Center */
> +
> +			if (data[4] | (data[3] & 0x01)) {
> +				input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
> +			} else {
> +				input_report_abs(input, ABS_MISC, 0);
> +			}
>  		} else if (features->type >= INTUOS5S && features->type <= INTUOSPL) {
>  			int i;
>  
> -- 
> 2.3.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]