From patchwork Tue Dec 14 21:48:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hooker X-Patchwork-Id: 75571 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 76A1AB6EED for ; Wed, 15 Dec 2010 08:48:49 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1PScjY-0004zU-2c; Tue, 14 Dec 2010 21:48:32 +0000 Received: from mail-qw0-f49.google.com ([209.85.216.49]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1PScjW-0004zP-8W for kernel-team@lists.ubuntu.com; Tue, 14 Dec 2010 21:48:30 +0000 Received: by qwj9 with SMTP id 9so1198090qwj.8 for ; Tue, 14 Dec 2010 13:48:29 -0800 (PST) Received: by 10.224.174.8 with SMTP id r8mr5514724qaz.332.1292363308590; Tue, 14 Dec 2010 13:48:28 -0800 (PST) Received: from localhost (c-68-48-24-113.hsd1.va.comcast.net [68.48.24.113]) by mx.google.com with ESMTPS id p13sm254403qcu.17.2010.12.14.13.48.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 14 Dec 2010 13:48:27 -0800 (PST) From: Robert Hooker To: kernel-team@lists.ubuntu.com, chase.douglas@canonical.com Subject: [Maverick SRU] [PATCH] Revert "UBUNTU: (pre-stable): input: Support Clickpad devices in ClickZone mode" Date: Tue, 14 Dec 2010 16:48:19 -0500 Message-Id: <1292363299-5647-1-git-send-email-sarvatt@ubuntu.com> X-Mailer: git-send-email 1.7.2.3 Cc: Robert Hooker X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Robert Hooker BugLink: http://bugs.launchpad.net/bugs/669399 This reverts commit da04c34f6499177fb0cdafafa04af38c36b11639. This patch was never adopted by upstream and is non-functional on maverick in it's current incarnation (LP: #582809). The improper checks for SYN_CAP_CLICKPAD(priv->ext_cap) instead of SYN_CAP_CLICKPAD(priv->ext_cap_0c) in the maverick version of this patch are also causing incorrect detection of a non-clickpad touchpad as a clickpad one and applying the filters which remove the bottom area of the touchpad. This revert only applies to maverick, lucid works properly due to not having 5f57d67da87332a9a1ba8fa7a33bf0680e1c76e7 and this commit was already dropped in natty. Signed-off-by: Robert Hooker --- drivers/input/mouse/synaptics.c | 48 --------------------------------------- drivers/input/mouse/synaptics.h | 1 - 2 files changed, 0 insertions(+), 49 deletions(-) diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index ae9891c..705589d 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -357,45 +357,6 @@ static void synaptics_pt_create(struct psmouse *psmouse) * Functions to interpret the absolute mode packets ****************************************************************************/ -/* left and right clickpad button ranges; - * the gap between them is interpreted as a middle-button click - */ -#define CLICKPAD_LEFT_BTN_X \ - ((XMAX_NOMINAL - XMIN_NOMINAL) * 2 / 5 + XMIN_NOMINAL) -#define CLICKPAD_RIGHT_BTN_X \ - ((XMAX_NOMINAL - XMIN_NOMINAL) * 3 / 5 + XMIN_NOMINAL) - -/* handle clickpad events */ -static void clickpad_process_packet(struct synaptics_data *priv, - struct synaptics_hw_state *hw) -{ - /* clickpad mode reports Y range from 0 to YMAX_NOMINAL, - * where the area Y < YMIN_NOMINAL is used as click buttons - */ - if (hw->y < YMIN_NOMINAL) { - /* button area */ - hw->z = 0; /* don't move pointer */ - /* clickpad reports only the middle button, and we need - * to fake left/right buttons depending on the touch position - */ - if (hw->middle) { /* clicked? */ - hw->middle = 0; - if (hw->x < CLICKPAD_LEFT_BTN_X) - hw->left = 1; - else if (hw->x > CLICKPAD_RIGHT_BTN_X) - hw->right = 1; - else - hw->middle = 1; - } - } else if (hw->middle) { - /* dragging */ - hw->left = priv->prev_hw.left; - hw->right = priv->prev_hw.right; - hw->middle = priv->prev_hw.middle; - } - priv->prev_hw = *hw; -} - static void synaptics_parse_hw_state(unsigned char buf[], struct synaptics_data *priv, struct synaptics_hw_state *hw) { memset(hw, 0, sizeof(struct synaptics_hw_state)); @@ -484,9 +445,6 @@ static void synaptics_process_packet(struct psmouse *psmouse) synaptics_parse_hw_state(psmouse->packet, priv, &hw); - if (SYN_CAP_CLICKPAD(priv->ext_cap)) - clickpad_process_packet(priv, &hw); - if (hw.scroll) { priv->scroll += hw.scroll; @@ -790,12 +748,6 @@ int synaptics_init(struct psmouse *psmouse) SYN_ID_MAJOR(priv->identity), SYN_ID_MINOR(priv->identity), priv->model_id, priv->capabilities, priv->ext_cap, priv->ext_cap_0c); - if (SYN_CAP_CLICKPAD(priv->ext_cap)) { - printk(KERN_INFO "Synaptics: Clickpad mode enabled\n"); - /* force to enable the middle button */ - priv->capabilities |= (1 << 18); - } - set_input_params(psmouse->dev, priv); /* diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h index 80907d0..b6aa7d2 100644 --- a/drivers/input/mouse/synaptics.h +++ b/drivers/input/mouse/synaptics.h @@ -110,7 +110,6 @@ struct synaptics_data { unsigned char pkt_type; /* packet type - old, new, etc */ unsigned char mode; /* current mode byte */ int scroll; - struct synaptics_hw_state prev_hw; }; void synaptics_module_init(void);