From patchwork Thu Sep 6 22:53:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gerecke, Jason" X-Patchwork-Id: 1418421 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 0811EDFFCF for ; Thu, 6 Sep 2012 22:54:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754700Ab2IFWxn (ORCPT ); Thu, 6 Sep 2012 18:53:43 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:51702 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754238Ab2IFWxm (ORCPT ); Thu, 6 Sep 2012 18:53:42 -0400 Received: by pbbrr13 with SMTP id rr13so3164584pbb.19 for ; Thu, 06 Sep 2012 15:53:42 -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:x-mailer; bh=ED+cdyVckWPda9bLyAne6g7zoPTqCQ2EkXvRpqBPqgU=; b=s4qhYHKQR51suFh9dw4cV24wFia4CtMuIB1mVmz83fjfQb2FO5fnn1mKyDi2vPKItL g8ULs2zPxB/0MKBxaB/xd0vP/10HyxeptOeoL3QErxmzJzq1IG2n2HTQ3JZ/rPUM2DXV XYhyFe4joa/r3lw7kBHqSTus4Urj8DsgrFdvLK+8zFd9VbRj6YerJlcMwUTEaRaM9ng0 Fru5Gz1a/TtmJctGNuh8uhJ11lglh2I9Np2Plw7xNM4QRrtbHqhCIBKMqnNkeM9R+5Yz fG93BZItoHj9yMoVExCl+yYZZ3Y1IazG3hDiaj4kMuMHFlnJ6jtZFM7p5K2K7IBBtUrh zfag== Received: by 10.66.72.130 with SMTP id d2mr5440928pav.59.1346972022267; Thu, 06 Sep 2012 15:53:42 -0700 (PDT) Received: from wacom-arch.wacom.com ([67.51.163.2]) by mx.google.com with ESMTPS id gh7sm2073611pbc.29.2012.09.06.15.53.40 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Sep 2012 15:53:41 -0700 (PDT) From: Jason Gerecke To: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com, pinglinux@gmail.com, chris@cnpbagwell.com Cc: Jason Gerecke Subject: [PATCH 1/5] Input: wacom - Allow any multi-input Intuos device to set prox Date: Thu, 6 Sep 2012 15:53:26 -0700 Message-Id: <1346972010-1330-1-git-send-email-killertofu@gmail.com> X-Mailer: git-send-email 1.7.12 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The ability to set the proximity flag should apply to any device that has both pen and touch input. Rather than listing classes of devices known to meet this criteria, simply filter on the quirk defining all such devices. Signed-off-by: Jason Gerecke Tested-by: Ping Cheng for the whole set. --- drivers/input/tablet/wacom_wac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 532d067..a8bc6c9 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -326,7 +326,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom) /* Enter report */ if ((data[1] & 0xfc) == 0xc0) { - if (features->type >= INTUOS5S && features->type <= INTUOS5L) + if (features->quirks == WACOM_QUIRK_MULTI_INPUT) wacom->shared->stylus_in_proximity = true; /* serial number of the tool */ @@ -414,7 +414,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom) /* Exit report */ if ((data[1] & 0xfe) == 0x80) { - if (features->type >= INTUOS5S && features->type <= INTUOS5L) + if (features->quirks == WACOM_QUIRK_MULTI_INPUT) wacom->shared->stylus_in_proximity = false; /*