From patchwork Wed Feb 4 22:36:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 5780071 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 8E6CFBF440 for ; Wed, 4 Feb 2015 22:36:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A7CCE202C8 for ; Wed, 4 Feb 2015 22:36:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C66AA2026F for ; Wed, 4 Feb 2015 22:36:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161319AbbBDWgw (ORCPT ); Wed, 4 Feb 2015 17:36:52 -0500 Received: from mail-pd0-f175.google.com ([209.85.192.175]:43323 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161313AbbBDWgw (ORCPT ); Wed, 4 Feb 2015 17:36:52 -0500 Received: by pdev10 with SMTP id v10so3493141pde.10 for ; Wed, 04 Feb 2015 14:36:51 -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=A0ouQhDKJAs1plAIpZfWjJl6FayB6orNAgjNve5PQMQ=; b=M6HpCUIpP7XG6bp5Uhdv0Nr/xjotNYF8YJwhBPjLrFMTon0y7SmsV0Vx0uOqTpQdra 4vDXFMskgSf1HN2xEN/E1Y7qhB96KxHt/oM8XnU05/scXp6DmLH+PvjzrpbKMC/9txLA UilEtZXDgUrZQQGOnUHKuf5kN0KPZeY+MZFjd1KxsRPnM1nOFIBRmIloW5xvjbF6CyD3 cHsLGwW1aqXnBv+VB4fxIc9HHhy+jQf8D/FfXEo3zVCHuvGZ/jjaZbKKsWeQYUu1yjyE 53tC5K9RQe5+yjvnQQemeP9Hb/+XWJ8RMJuouLjAWf9KtHGZ4pV3n7bS8Wz8o26ZqSZf YUGw== X-Received: by 10.68.227.201 with SMTP id sc9mr745400pbc.19.1423089411562; Wed, 04 Feb 2015 14:36:51 -0800 (PST) Received: from wacom-XPS-8500.wacom.com ([67.51.163.2]) by mx.google.com with ESMTPSA id rk9sm3050625pab.40.2015.02.04.14.36.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Feb 2015 14:36:50 -0800 (PST) From: Ping Cheng X-Google-Original-From: Ping Cheng To: jkosina@suse.cz Cc: linux-input@vger.kernel.org, killertofu@gmail.com, Ping Cheng Subject: [PATCH] Add missing ABS_MISC event and feature declaration for 27QHD Date: Wed, 4 Feb 2015 14:36:56 -0800 Message-Id: <1423089416-6159-1-git-send-email-pingc@wacom.com> X-Mailer: git-send-email 1.9.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 27QHD has the same x_min/y_min (WACOM_CINTIQ_OFFSET) as other Cintiqs. ABS_MISC event is required for PAD packet to work properly with xf86-input-wacom. Signed-off-by: Ping Cheng --- drivers/hid/wacom_wac.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 1a65079..8f65ba3 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -778,6 +778,11 @@ static int wacom_intuos_irq(struct wacom_wac *wacom) input_report_abs(input, ABS_X, be16_to_cpup((__be16 *)&data[4])); input_report_abs(input, ABS_Y, be16_to_cpup((__be16 *)&data[6])); input_report_abs(input, ABS_Z, be16_to_cpup((__be16 *)&data[8])); + if ((data[2] & 0x07) | data[4] | data[5] | data[6] | data[7] | data[8] | data[9]) { + input_report_abs(input, ABS_MISC, PAD_DEVICE_ID); + } else { + input_report_abs(input, ABS_MISC, 0); + } } else if (features->type == CINTIQ_HYBRID) { /* * Do not send hardware buttons under Android. They @@ -2727,7 +2732,8 @@ static const struct wacom_features wacom_features_0xF6 = static const struct wacom_features wacom_features_0x32A = { "Wacom Cintiq 27QHD", 119740, 67520, 2047, 63, WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, - WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; + WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, + WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET }; static const struct wacom_features wacom_features_0x32B = { "Wacom Cintiq 27QHD touch", 119740, 67520, 2047, 63, WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES,