From patchwork Thu Jan 22 23:53:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gerecke, Jason" X-Patchwork-Id: 5689891 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E5F55C058D for ; Thu, 22 Jan 2015 23:53:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2E6120268 for ; Thu, 22 Jan 2015 23:53:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE18320260 for ; Thu, 22 Jan 2015 23:53:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753448AbbAVXxf (ORCPT ); Thu, 22 Jan 2015 18:53:35 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:39843 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753289AbbAVXxe (ORCPT ); Thu, 22 Jan 2015 18:53:34 -0500 Received: by mail-pa0-f45.google.com with SMTP id et14so367509pad.4 for ; Thu, 22 Jan 2015 15:53:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=SUr1xjL9tuT0jVJabQbr3hi4iOFCnWko56WkBT3vpAE=; b=CTgN9bGFGNqlj8W/cDp5fNj2jHUYoQBHz3jgOlC477X88n4LJuFrH0JW7xYbt8IKZ1 tm75MAg3x2E7YXBgV6Er69jJzWQVgkdU4JM5T5qk922l8XEa4GqMOsyTWboL1XG48Eid UZAShL4YlA0IeqTUwSHCyjWfYJBT32a+TXR0DeNGZukqQ+RQguJsx9tBUkLGVUo8WSwL /gbdjXHdy/9l4uTEcw+8aq9s1OvMA0ke36wb7dgR3vNjk0Ns6lBUt17W2rnrG5G9ndV1 FzB2UA5h3P7/sl8VjO0qlZa2HkVF0S4KhWPIDU07BS5ys/O7pniDdBLVxBsCS+CPFOtP yeiw== X-Received: by 10.66.66.203 with SMTP id h11mr6198473pat.131.1421970814278; Thu, 22 Jan 2015 15:53:34 -0800 (PST) Received: from wacom-arch2.localdomain ([67.51.163.2]) by mx.google.com with ESMTPSA id ua4sm10079724pbc.23.2015.01.22.15.53.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Jan 2015 15:53:33 -0800 (PST) From: Jason Gerecke To: linux-input@vger.kernel.org Cc: Ping Cheng , Benjamin Tissoires , Jiri Kosina , Dmitry Torokhov , Jason Gerecke Subject: [PATCH] HID: wacom: Report ABS_MISC event for Cintiq Companion Hybrid Date: Thu, 22 Jan 2015 15:53:28 -0800 Message-Id: <1421970808-4098-1-git-send-email-killertofu@gmail.com> X-Mailer: git-send-email 2.2.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- Question: I'd like to write a version of this patch which targets stable releases where the stylus and pad share the device node. How would I go about submitting one, since CCing this patch to stable won't quite do the trick (the patches would have to be against our old home under drivers/input/tablet...) drivers/hid/wacom_wac.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index a4ba8ca..f886149 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -783,6 +783,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;