Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1962181rwb; Thu, 8 Dec 2022 18:08:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf53rVKH9nBYqqlHTA/Y1RWK99Y7WUh/pdY4T7t7uTFOwhdmnL+KjxQWm0D/Ywx01IiA8oeK X-Received: by 2002:a05:6402:1947:b0:462:7b9a:686f with SMTP id f7-20020a056402194700b004627b9a686fmr3233080edz.4.1670551707312; Thu, 08 Dec 2022 18:08:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670551707; cv=none; d=google.com; s=arc-20160816; b=lhB7Rjk4Lu5YEKJWtePpd22KbIy2IyWjYJx5m6XheKBpkA9ZPfavKZppv44WVQSzjd WuJrNnvJnY6J1XW/efpi5OKzn3A6O7XF9hDQCncjxFmSxhXflPI78DJetuubX31uWwuw rykzI1sRgFCCBedThVM8Dk3ke0f8lEpp5X7i6o5wRIJrK3nmmrI+EDHTzGoMvF9VPCCe eUjEflk84aBWBAlzVKkULfxVBq6oyKTFGLw7ibx2GFsAYTn/6IEslBd6zPKpj5mBd1tJ 9uadPaSrP53Bhq8HRoQ909WidrWv5VsUQYckFeojrDq0BAWnblgWH8ryxiA18dGDMFIL CmYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YpjUITsP3izvwVyTbD/APNjnztZs1xEJI8Ir6lrflVU=; b=AxvRzj2+2KmTArBn2EN2T2ddAeyKNmSXQ3dTH5L6RThs0TADvSbcThFR2GbSplFV+Q M/e7dOBE27nOYj6oDEmTxDuhI7wwo01jqTWE5i4tqmcBPk8h7jyoF39Axgy1qjd+tQCw XTNtaqmis+ahb/YMvpfQyRzrbqob17eAhkE5oFW2O3DNkMlUEoLJuJLZvSgGldzN+Vx9 kzfjwvSqGCP52hpWFNkF8Sr3ts7puA/KbwXoxxSNt5Jz3WTs0YYYEkWjy26V97wDMSj7 ysUHui47odPaYcDz3AphVWHy+FeF+W36m6wfq8wsHxeQlkQE8DLe9gHzt9U4WEi5USf3 s7zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oROwjNNY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z10-20020a056402274a00b00463cd7d6e7asi403785edd.30.2022.12.08.18.08.09; Thu, 08 Dec 2022 18:08:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oROwjNNY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229738AbiLIBso (ORCPT + 73 others); Thu, 8 Dec 2022 20:48:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229650AbiLIBsl (ORCPT ); Thu, 8 Dec 2022 20:48:41 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16A2231DF1; Thu, 8 Dec 2022 17:48:37 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id k7so3345742pll.6; Thu, 08 Dec 2022 17:48:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=YpjUITsP3izvwVyTbD/APNjnztZs1xEJI8Ir6lrflVU=; b=oROwjNNYtG2PxlGe0lB8WKs7sy7mntxHy1KlkC9HCwIXQzO0DHtgzunfhWDnZkzf62 rKjNj+u4bLz+UcQOz44tIWqvuA+2T0lnHXU5HevZ+es290YV7goh4CyssCH3yhSj3T5C lX25Gvejj+7zbWoWgkqfgYFf2lqviHEhCEkd1ERuVaGaXtoVnlH4OSNwAuR4+aw8tcm7 jBkfA3OFBkzxYi9P2q7CQ101SkW3RghxO6dvj4om16ixWTkNSljgrnSLVgZW3Ou1k12N 8KccypNiCPfMDUAM4uzwLRRS0xUAPZU7tNhmCTR0mUlHrHCUTx2VyVZGHI6dvV10G2Qa LlYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YpjUITsP3izvwVyTbD/APNjnztZs1xEJI8Ir6lrflVU=; b=Q9HylAd5RMuznNUZzENfdFgGYLboCTPBVmnwIrgCjC4jReGzXGliVadrYXRi02Chmz ivVOFpgSdo4AEraNlAH3VtlXY8hnn+OYhHfLKmf1KMpPnGCwOHBNjkQzLaE1kLH8Bj4a +JmohPxwCc2JUVdaasguNWE8rtN5wkgo0XeLe/IJ4tsc5cLDswYUbPicvfxB8XRFXRTi yOx7CLhkwCKklqfS/T7NOK5n6I8qBel0gu3Yz0alpc8V3gOwWcifkTYPaoGw9oDVG0hQ a8prji0UizdEcS3edFCMUzw9gw37uO29ZRocNG5PEZAWumVzAlM/iQMp8wzD6OlFSPfg Wkig== X-Gm-Message-State: ANoB5pm1CAL7g25pbuiLrjhvbfIDr/h8FiiYRrJXTpmZro2SZI8raTBj uA3Tg4a+98dnwDr8PJMQ2d1VM3KDdzU= X-Received: by 2002:a17:902:b494:b0:188:635d:4ca9 with SMTP id y20-20020a170902b49400b00188635d4ca9mr4188341plr.2.1670550516406; Thu, 08 Dec 2022 17:48:36 -0800 (PST) Received: from google.com ([2620:15c:9d:2:5853:f1e8:694c:1488]) by smtp.gmail.com with ESMTPSA id q13-20020a170902eb8d00b00189548573a2sm81875plg.161.2022.12.08.17.48.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 17:48:35 -0800 (PST) Date: Thu, 8 Dec 2022 17:48:32 -0800 From: Dmitry Torokhov To: Douglas Anderson Cc: Bjorn Andersson , mka@chromium.org, swboyd@chromium.org, linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org, Yunlong Jia , Konrad Dybcio , Johnny Chuang , linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/5] Input: elants_i2c: Delay longer with reset asserted Message-ID: References: <20221208192006.1070898-1-dianders@chromium.org> <20221208111910.5.I6edfb3f459662c041563a54e5b7df727c27caaba@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 08, 2022 at 05:38:28PM -0800, Dmitry Torokhov wrote: > On Thu, Dec 08, 2022 at 11:20:06AM -0800, Douglas Anderson wrote: > > The elan touchscreen datasheet says that the reset GPIO only needs to > > be asserted for 500us in order to reset the regulator. The problem is > > that some boards need a level shifter between the signals on the GPIO > > controller and the signals on the touchscreen. All of these extra > > components on the line can slow the transition of the signals. On one > > board, we measured the reset line and saw that it took almost 1.8ms to > > go low. Even after we bumped up the "drive strength" of the signal > > from the default 2mA to 8mA we still saw it take 421us for the signal > > to go low. > > > > In order to account for this we let's lengthen the amount of time that > > we keep the reset asserted. Let's bump it up from 500us to 5000us. > > That's still a relatively short amount of time and is much safer. > > > > It should be noted that this fixes real problems. Case in point: > > 1. The touchscreen power rail may be shared with another device (like > > an eDP panel). That means that at probe time power might already be > > on. > > 2. In probe we grab the reset GPIO and assert it (make it low). > > 3. We turn on power (a noop since it was already on). > > 4. We wait 500us. > > 5. We deassert the reset GPIO. > > > > With the above case and only a 500us delay we saw only a partial reset > > asserted, which is bad. Giving it 5ms is overkill but feels safer in > > case someone else has a different level shifter setup. > > > > Signed-off-by: Douglas Anderson > > Applied, thank you. Unapplied ;) I guess we should follow kernel test robot's advise and switch to using usleep_range(). -- Dmitry