From patchwork Wed Sep 2 00:45:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Duson Lin X-Patchwork-Id: 7107631 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 5DC969F1CD for ; Wed, 2 Sep 2015 00:45:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 80625205F2 for ; Wed, 2 Sep 2015 00:45:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E0B2205F1 for ; Wed, 2 Sep 2015 00:45:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751027AbbIBApX (ORCPT ); Tue, 1 Sep 2015 20:45:23 -0400 Received: from emcscan.emc.com.tw ([192.72.220.5]:34130 "EHLO emcscan.emc.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750717AbbIBApX convert rfc822-to-8bit (ORCPT ); Tue, 1 Sep 2015 20:45:23 -0400 Received: from unknown (HELO elanic) ([192.168.10.6]) by emcscan.emc.com.tw with ESMTP; 02 Sep 2015 08:45:20 +0800 Received: from [192.168.33.24] (unknown [192.168.33.24]) by elanic (Postfix) with ESMTP id DF36F3C9A14; Wed, 2 Sep 2015 08:45:19 +0800 (CST) From: duson Subject: [PATCH] Input: elan_i2c - Use iap_version to get firmware information Date: Wed, 2 Sep 2015 08:45:21 +0800 Message-Id: Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, dusonlin@emc.com.tw To: Dmitry Torokhov Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) X-Mailer: Apple Mail (2.2102) 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 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. Signed-off-by: Duson Lin --- drivers/input/mouse/elan_i2c_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); if (error) { dev_err(&data->client->dev,--