From patchwork Wed Sep 2 00:55:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Duson Lin X-Patchwork-Id: 7107651 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 645AD9F1CD for ; Wed, 2 Sep 2015 00:55:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 82B9820434 for ; Wed, 2 Sep 2015 00:55:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 423F92042C for ; Wed, 2 Sep 2015 00:55:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751472AbbIBAzp (ORCPT ); Tue, 1 Sep 2015 20:55:45 -0400 Received: from emcscan.emc.com.tw ([192.72.220.5]:28114 "EHLO emcscan.emc.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750717AbbIBAzo convert rfc822-to-8bit (ORCPT ); Tue, 1 Sep 2015 20:55:44 -0400 Received: from unknown (HELO emc.com.tw) ([192.168.10.1]) by emcscan.emc.com.tw with ESMTP; 02 Sep 2015 08:55:42 +0800 Received: from NB92067 ([192.168.33.28]) by emc.com.tw (8.13.7+Sun/8.13.7) with ESMTP id t820tW1W006054; Wed, 2 Sep 2015 08:55:34 +0800 (CST) From: "DusonLin" To: "'Dmitry Torokhov'" Cc: , References: In-Reply-To: Subject: RE: [PATCH] Input: elan_i2c - Use iap_version to get firmware information Date: Wed, 2 Sep 2015 08:55:28 +0800 Message-ID: <002301d0e51a$14016310$3c042930$@emc.com.tw> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJk4bGfOQsMMZ1bpnuWlUPmfXIXn50AcJJQ Content-Language: zh-tw Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 Hi Dmitry, Please ignore this patch, I will send a right again. Thank you. Duson -----Original Message----- From: duson [mailto:dusonlin@emc.com.tw] Sent: Wednesday, September 02, 2015 8:38 AM To: Dmitry Torokhov Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; dusonlin@emc. com.tw Subject: [PATCH] Input: elan_i2c - Use iap_version to get firmware information When driver get exception ic type (0xFF), maybe occurred from wrong I2C protocol communication, system crash or other unknown situation, instead of ic_type we use iap_version to get firmware information. --- drivers/input/mouse/elan_i2c_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) if (error) { dev_err(&data->client->dev, -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c index 5b5f403..494858c 100644 --- a/drivers/input/mouse/elan_i2c_core.c +++ b/drivers/input/mouse/elan_i2c_core.c @@ -4,7 +4,7 @@ * Copyright (c) 2013 ELAN Microelectronics Corp. * * Author: ??? (Duson Lin) - * Version: 1.5.9 + * Version: 1.6.0 * * Based on cyapa driver: * copyright (c) 2011-2012 Cypress Semiconductor, Inc. @@ -40,7 +40,7 @@ #include "elan_i2c.h" #define DRIVER_NAME "elan_i2c" -#define ELAN_DRIVER_VERSION "1.5.9" +#define ELAN_DRIVER_VERSION "1.6.0" #define ETP_MAX_PRESSURE 255 #define ETP_FWIDTH_REDUCE 90 #define ETP_FINGER_WIDTH 15 @@ -261,7 +261,7 @@ static int elan_query_device_info(struct elan_tp_data *data) if (error) return error; - error = elan_get_fwinfo(data->ic_type, &data->fw_vaildpage_count, + error = elan_get_fwinfo(data->iap_version, &data->fw_vaildpage_count, &data->fw_signature_address);