From patchwork Thu Mar 20 13:44:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lothar_Wa=C3=9Fmann?= X-Patchwork-Id: 3866041 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id ABABF9F382 for ; Thu, 20 Mar 2014 13:45:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 922892024F for ; Thu, 20 Mar 2014 13:45:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CBEB22021A for ; Thu, 20 Mar 2014 13:45:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758539AbaCTNpa (ORCPT ); Thu, 20 Mar 2014 09:45:30 -0400 Received: from mail.karo-electronics.de ([81.173.242.67]:52102 "EHLO mail.karo-electronics.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758307AbaCTNp1 (ORCPT ); Thu, 20 Mar 2014 09:45:27 -0400 From: =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= To: Dmitry Torokhov , Fugang Duan , Grant Likely , Henrik Rydberg , Ian Campbell , Jingoo Han , Kumar Gala , Mark Rutland , Pawel Moll , Rob Herring , Rob Landley , Sachin Kamat , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Budig , =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= , Daniel Wagener Subject: [PATCHv5 3/5] Input: edt-ft5x06: Adjust delays to conform datasheet Date: Thu, 20 Mar 2014 14:44:33 +0100 Message-Id: <1395323075-12146-4-git-send-email-LW@KARO-electronics.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395323075-12146-1-git-send-email-LW@KARO-electronics.de> References: <1395234563-11034-1-git-send-email-LW@KARO-electronics.de> <1395323075-12146-1-git-send-email-LW@KARO-electronics.de> MIME-Version: 1.0 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 The FT5x06 datasheet specifies a minimum reset width of 5ms and a delay between deassertion of reset and start of reporting of 300ms. Adjust the delays to conform to the datasheet. With the original delays I sometimes experienced communication timeouts when initializing the controller. Signed-off-by: Lothar Waßmann --- drivers/input/touchscreen/edt-ft5x06.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 03dab2f..0298568 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -635,7 +635,7 @@ static int edt_ft5x06_ts_reset(struct i2c_client *client, return error; } - mdelay(5); + msleep(5); gpio_set_value(tsdata->wake_pin, 1); } if (gpio_is_valid(tsdata->reset_pin)) { @@ -650,9 +650,9 @@ static int edt_ft5x06_ts_reset(struct i2c_client *client, return error; } - mdelay(50); + msleep(5); gpio_set_value(tsdata->reset_pin, 1); - mdelay(100); + msleep(300); } return 0;