From patchwork Tue Jul 5 23:25:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 947142 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p65NN0dA002015 for ; Tue, 5 Jul 2011 23:24:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751750Ab1GEXYF (ORCPT ); Tue, 5 Jul 2011 19:24:05 -0400 Received: from mail-iy0-f174.google.com ([209.85.210.174]:65079 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751567Ab1GEXYE (ORCPT ); Tue, 5 Jul 2011 19:24:04 -0400 Received: by mail-iy0-f174.google.com with SMTP id 12so5629017iyb.19 for ; Tue, 05 Jul 2011 16:24:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=CaCrwMwEzkW7VSif+7BzWafrsUCrQ0j31mmFzGii8qA=; b=FV3jHkPfCOiQ6a6hJ0MGHsvmxxAzDfL2q1I23Ppchch/wraUvMHPWMAD4SttqLRJ9L O5Jlgz/2RAgFl0yEF+5OR62j+92ikw16k+pRO5EClFtiLI7DbuY19TYJVtvOzpWrAW0p yyo6oYl9d+6pdHOkWPSleyBhvJtcBoiu13RJU= Received: by 10.42.230.5 with SMTP id jk5mr5912020icb.526.1309908243859; Tue, 05 Jul 2011 16:24:03 -0700 (PDT) Received: from localhost.localdomain ([67.51.163.10]) by mx.google.com with ESMTPS id a9sm8083863icy.18.2011.07.05.16.24.02 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Jul 2011 16:24:03 -0700 (PDT) From: Ping Cheng To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, rydberg@euromail.se, Ping Cheng , Ping Cheng Subject: [PATCH 2/3 v2] input : wacom - Update Graphire4 and old Bamboo tablet buttons Date: Tue, 5 Jul 2011 16:25:32 -0700 Message-Id: <1309908332-18829-1-git-send-email-pinglinux@gmail.com> X-Mailer: git-send-email 1.7.5.4 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 05 Jul 2011 23:24:06 +0000 (UTC) Bamboo touch sets BTN_BACK, BTN_FORWARD, BTN_LEFT, and BTN_RIGHT as the default button events for tablet buttons. Change Graphire4 and old Bamboo to the same settings. Signed-off-by: Ping Cheng Reviewed-by: Chris Bagwell Reviewed-by: Chris Bagwell --- drivers/input/tablet/wacom_wac.c | 19 ++++++++----------- 1 files changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index b93501a..19554a4 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -275,8 +275,8 @@ static int wacom_graphire_irq(struct wacom_wac *wacom) prox = data[7] & 0xf8; if (prox || wacom->id[1]) { wacom->id[1] = PAD_DEVICE_ID; - input_report_key(input, BTN_0, (data[7] & 0x40)); - input_report_key(input, BTN_4, (data[7] & 0x80)); + input_report_key(input, BTN_BACK, (data[7] & 0x40)); + input_report_key(input, BTN_FORWARD, (data[7] & 0x80)); rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); input_report_rel(input, REL_WHEEL, rw); if (!prox) @@ -291,10 +291,10 @@ static int wacom_graphire_irq(struct wacom_wac *wacom) prox = (data[7] & 0xf8) || data[8]; if (prox || wacom->id[1]) { wacom->id[1] = PAD_DEVICE_ID; - input_report_key(input, BTN_0, (data[7] & 0x08)); - input_report_key(input, BTN_1, (data[7] & 0x20)); - input_report_key(input, BTN_4, (data[7] & 0x10)); - input_report_key(input, BTN_5, (data[7] & 0x40)); + input_report_key(input, BTN_BACK, (data[7] & 0x08)); + input_report_key(input, BTN_LEFT, (data[7] & 0x20)); + input_report_key(input, BTN_FORWARD, (data[7] & 0x10)); + input_report_key(input, BTN_RIGHT, (data[7] & 0x40)); input_report_abs(input, ABS_WHEEL, (data[8] & 0x7f)); if (!prox) wacom->id[1] = 0; @@ -1076,17 +1076,14 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, switch (wacom_wac->features.type) { case WACOM_MO: - __set_bit(BTN_1, input_dev->keybit); - __set_bit(BTN_5, input_dev->keybit); - input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); /* fall through */ case WACOM_G4: input_set_capability(input_dev, EV_MSC, MSC_SERIAL); - __set_bit(BTN_0, input_dev->keybit); - __set_bit(BTN_4, input_dev->keybit); + __set_bit(BTN_BACK, input_dev->keybit); + __set_bit(BTN_FORWARD, input_dev->keybit); /* fall through */ case GRAPHIRE: