From patchwork Sun Mar 5 02:13:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matjaz Hegedic X-Patchwork-Id: 9604411 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 104286016C for ; Sun, 5 Mar 2017 02:13:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08B682823D for ; Sun, 5 Mar 2017 02:13:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD83E28354; Sun, 5 Mar 2017 02:13:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F9F12823D for ; Sun, 5 Mar 2017 02:13:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752435AbdCECNT (ORCPT ); Sat, 4 Mar 2017 21:13:19 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35557 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752296AbdCECNS (ORCPT ); Sat, 4 Mar 2017 21:13:18 -0500 Received: by mail-wm0-f68.google.com with SMTP id z63so6326793wmg.2; Sat, 04 Mar 2017 18:13:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=JJmMUnxXZiLrbsfckPK2dMagcJ1xNLXftQ3okqQ8mho=; b=s1y+5i6+4bUE3Ya9YDROAuKz/j2qGVUnlLq02Hqvd0lM50u85ppbXhYrW4olx/MbxH Da8xbIZ2GPs6YJk8dxHXPuYqGgomT+vFpPE9Crp86/zG+xugbeM3E34LbHixYChShe6z dOYKkaGsVJAA/EiUSuKec3Ro5x69W/Khx4vzfqIHv9XLKeVUEMXjBGZoQNpVEpvWn71/ Q1L6TtiSFQz8NiG7PQySH5OU5eksqGYQQ7rZtHtOGdw7c8Sj5gddt5Q6oMsdoPfJEtQ8 txtVBN2Pv57XYvPmQ/rgZxiITOIksgEwv/4+EpplQlnFAwT7W0+G7i62BtsNg+O01fvq ecsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=JJmMUnxXZiLrbsfckPK2dMagcJ1xNLXftQ3okqQ8mho=; b=Vp2wIUYoJWSKPj8l7YCh1a0p4ow0QPcm2C8m6ZroDtIY7++jWCXyzxyInNgBIDJVnD 2aUzscwdTk/bssglf1oZhc7Uv1RddZ2rUa4Abt2EpslQPc71hBOZ/aIVwO1j1pMnB8/n aK7geYR8wfbwRdMue3qOuWHXvAMKe6UN3scPELe9sSPiSfQFxx2w7fv1TGR1z4p6p6m7 z1Q52rh3Z+fYQoT91MLhAs1iKFz5UkI9o+w40+zJm8zieYzGW3QA1Af4N3kDRd/eoB+s E6aQw/3cPXPtsCOJ3FjxubuDbXYBdmosK5FOFsYH7+omA8PIksxrn8g5hV9ayTuH27RU MEhw== X-Gm-Message-State: AMke39m6xeG3dQfDbvbyntwTsCsvJoUI8725xj4miDtlUiclngo0unqd3n8jsp7wp4mttA== X-Received: by 10.28.184.8 with SMTP id i8mr7901123wmf.26.1488679996558; Sat, 04 Mar 2017 18:13:16 -0800 (PST) Received: from X205TA.upc.at (213-47-29-34.cable.dynamic.surfer.at. [213.47.29.34]) by smtp.gmail.com with ESMTPSA id c76sm121552wme.23.2017.03.04.18.13.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 04 Mar 2017 18:13:15 -0800 (PST) From: Matjaz Hegedic To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Matjaz Hegedic Subject: [PATCH] Input: elan_i2c - add ASUS EeeBook X205TA special touchpad fw Date: Sun, 5 Mar 2017 03:13:02 +0100 Message-Id: <1488679982-9825-1-git-send-email-matjaz.hegedic@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP EeeBook X205TA is yet another ASUS device with a special touchpad firmware that needs to be accounted for during initialization, or else the touchpad will go into an invalid state upon suspend/resume. Adding the appropriate ic_type and product_id check fixes the problem. Signed-off-by: Matjaz Hegedic --- drivers/input/mouse/elan_i2c_core.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c index 2c7d287..dde3ad7 100644 --- a/drivers/input/mouse/elan_i2c_core.c +++ b/drivers/input/mouse/elan_i2c_core.c @@ -218,17 +218,19 @@ static int elan_query_product(struct elan_tp_data *data) static int elan_check_ASUS_special_fw(struct elan_tp_data *data) { - if (data->ic_type != 0x0E) - return false; - - switch (data->product_id) { - case 0x05 ... 0x07: - case 0x09: - case 0x13: - return true; - default: - return false; + if (data->ic_type == 0x0E) { + switch (data->product_id) { + case 0x05 ... 0x07: + case 0x09: + case 0x13: + return true; + } } + /* ASUS EeeBook X205TA */ + else if (data->ic_type == 0x8 && data->product_id == 0x26) + return true; + + return false; } static int __elan_initialize(struct elan_tp_data *data)