From patchwork Fri Aug 23 01:15:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gerecke, Jason" X-Patchwork-Id: 2848485 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 33DADBF546 for ; Fri, 23 Aug 2013 01:16:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3FE59202BC for ; Fri, 23 Aug 2013 01:16:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 205C52026F for ; Fri, 23 Aug 2013 01:16:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753428Ab3HWBQ3 (ORCPT ); Thu, 22 Aug 2013 21:16:29 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:37238 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753301Ab3HWBQ2 (ORCPT ); Thu, 22 Aug 2013 21:16:28 -0400 Received: by mail-pd0-f176.google.com with SMTP id q10so14025pdj.35 for ; Thu, 22 Aug 2013 18:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4axL5Sm+tKvV/O726kXjFuTesTsEQ/h5MbEIn1mKHrU=; b=u9R0RjMYsaclsc8Z5qQW68F9bul/0M1fiepFKmWg2JuYQjMDID1vz9lx9DmnX4Bx3v avPRNaf6U3pnf6yhCsFRU0KS+ivDBYS7p5aVnf8W5PmLTnMEvvhIdpqWvUZQ3Y5yIhsF IKJJcx0Czvy2Gp110F24RUSvlgQ/MoWOGbyWTTzkf4ZeuCmNxpaSBaFieCF4f3Qrosfd oNkx0KH9ibfdHG3t6JNrpSYzWWQR7Hj7S4s2MG/z7TISkj2I/7xXaDaKT0cZt3OIb2ZO 6s7Q4+3vQt31XRWwOR2kkU0QbawbJGF2zy0WQts5BNPep8/tsbLwAp8oL5ctbKEehwsp x5dw== X-Received: by 10.68.212.199 with SMTP id nm7mr242678pbc.177.1377220588110; Thu, 22 Aug 2013 18:16:28 -0700 (PDT) Received: from wacom-arch.wacom.com ([67.51.163.2]) by mx.google.com with ESMTPSA id om2sm17755690pbc.30.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Aug 2013 18:16:27 -0700 (PDT) From: Jason Gerecke To: linuxwacom-devel@lists.sourceforge.net, linux-input@vger.kernel.org, pinglinux@gmail.com Cc: Jason Gerecke Subject: [PATCH 2/3] Input: wacom - Provide a range for the ABS_MISC axis Date: Thu, 22 Aug 2013 18:15:36 -0700 Message-Id: <1377220537-1474-2-git-send-email-killertofu@gmail.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1377220537-1474-1-git-send-email-killertofu@gmail.com> References: <1377220537-1474-1-git-send-email-killertofu@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Android marks found axes as 'valid' only if they have a minimum and maximum value that aren't equal. Since we don't actually assign any range information for ABS_MISC, Android doesn't bother to mark it such. This prevents userspace from being able to make use of tool serial information. Signed-off-by: Jason Gerecke --- drivers/input/tablet/wacom_wac.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 8ccfe91..869e9c9 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -1468,6 +1468,8 @@ static void wacom_abs_set_axis(struct input_dev *input_dev, { struct wacom_features *features = &wacom_wac->features; + input_set_abs_params(input_dev, ABS_MISC, INT_MIN, INT_MAX, 0, 0); + if (features->device_type == BTN_TOOL_PEN) { input_set_abs_params(input_dev, ABS_X, 0, features->x_max, features->x_fuzz, 0);