From patchwork Sat Jul 11 14:36:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: HungNien Chen X-Patchwork-Id: 6770751 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 20043C05AC for ; Sat, 11 Jul 2015 14:37:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 459FC20674 for ; Sat, 11 Jul 2015 14:37:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 629C820670 for ; Sat, 11 Jul 2015 14:37:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750936AbbGKOhW (ORCPT ); Sat, 11 Jul 2015 10:37:22 -0400 Received: from ml01.weidahitech.com ([61.222.87.235]:2275 "EHLO ml01.weidahitech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbbGKOhW (ORCPT ); Sat, 11 Jul 2015 10:37:22 -0400 Received: from mail01.advancedsilicon.com.tw (mail01.wht.local [192.168.10.15]) by ml01.weidahitech.com (8.13.8/8.13.8) with ESMTP id t6BEamaj002047; Sat, 11 Jul 2015 22:36:49 +0800 Received: from LabPC08.WHT.local ([192.168.10.88]) by mail01.advancedsilicon.com.tw with Microsoft SMTPSVC(6.0.3790.4675); Sat, 11 Jul 2015 22:37:09 +0800 From: HungNien Chen To: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com, charliemooney@google.com, HungNien Chen Subject: [PATCH] Input: wdt87xx_i2c - Change the sleep time to 2500ms after the sw reset Date: Sat, 11 Jul 2015 22:36:42 +0800 Message-Id: <1436625402-4501-1-git-send-email-hn.chen@weidahitech.com> X-Mailer: git-send-email 1.9.1 X-OriginalArrivalTime: 11 Jul 2015 14:37:09.0151 (UTC) FILETIME=[110AE2F0:01D0BBE7] Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 The original value is 200ms, it includes the loading fw & boot up to the main function. After that, the main function will do algorithm initialized and touch calibrtion about 1.1 second. The touch calibration will change controller freq to scan the best working freq and it has risk to make the i2c data error when doing fw update. We extend the sleep to 2500ms after the sw reset to skip this period time. Signed-off-by: HungNien Chen --- drivers/input/touchscreen/wdt87xx_i2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/wdt87xx_i2c.c b/drivers/input/touchscreen/wdt87xx_i2c.c index b97cb4f..cfd1487 100644 --- a/drivers/input/touchscreen/wdt87xx_i2c.c +++ b/drivers/input/touchscreen/wdt87xx_i2c.c @@ -157,6 +157,7 @@ /* Controller requires minimum 300us between commands */ #define WDT_COMMAND_DELAY_MS 2 #define WDT_FLASH_WRITE_DELAY_MS 4 +#define WDT_FW_RESET_TIME 2500 struct wdt87xx_sys_param { u16 fw_id; @@ -413,7 +414,7 @@ static int wdt87xx_sw_reset(struct i2c_client *client) } /* Wait the device to be ready */ - msleep(200); + msleep(WDT_FW_RESET_TIME); return 0; }