Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp376513rwr; Wed, 19 Apr 2023 07:41:19 -0700 (PDT) X-Google-Smtp-Source: AKy350ZPTWg+7n90zK/kejc9+/i1IDotZ6r/rrYnLGvr8H31mIvcV2oQlupZ90ZoVVh3Xiv/RjWF X-Received: by 2002:a17:90a:e28d:b0:246:9932:18a2 with SMTP id d13-20020a17090ae28d00b00246993218a2mr3004730pjz.31.1681915279454; Wed, 19 Apr 2023 07:41:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681915279; cv=none; d=google.com; s=arc-20160816; b=j34xm0/IQ43Y3BcZvFDhn735Dsaj2mzsNW4blTzACm8y5l9On9smSoTGPuaNJsCjqy OBK6dFXHhy6f8FuLf9TBklcrdUrZJaG2cmvhZRhDgEc3hKWSW+sy22x1b3xTLhzkR1k0 TWqsYEKhIxChEMpuVoswRO3RgtAIo31DsLPp0yaq3/0oKpC6Rxktwy6IHYCDiLfcf/5e lXnOza3iLqMgEZSfN0AQxhipP5zVI5IlX184gz58tZYRxCxIRCu/eMNQ+B/hKqeqL4C+ 89mFv5ncLfRQ08SWCDo9LH0wJuM5NLN5EMOMXjzINUD818u3S2OnzaSYp1DrBu9IPZkp z9Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Ilxu6Q/jc5aOhDRIt3j6AWcNhm/qlHFPZW+HtjiMVA4=; b=saqAKiUyxMWUkZcyDPuBmOx8PruIrtmzCOr50nQMaTgKBIxXaOHGHkd7+Tup1ntb4S SfEGSWcrAAAwa46TkL23U13s0GNBlmMrdZ8z2bdq68yc3C6F5pDrikK2YcXeYINHrX7h jWiJ6MYBY2bUMYh5vqrMZoE8NpKQ18xlPyhqiHHUeEhgcJiy7AWOx56aLFMejISfkEAt Jkb8xB+fB5lYm97hKFX1MmLp8+CvOB1q8A/ZdBaoaeKG6E+rWiBxLFQY0McD0o36OpYS DjuHu+wP1CBKQT6FTdK9yrEL9HbwxOLlKaoycj1/336HUb84G+HBwPVI5kFXP5g2qj2i ZJdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CgkHuBeT; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t1-20020a17090aba8100b0023670bc014dsi1966318pjr.110.2023.04.19.07.41.08; Wed, 19 Apr 2023 07:41:19 -0700 (PDT) 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=@chromium.org header.s=google header.b=CgkHuBeT; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233084AbjDSOib (ORCPT + 99 others); Wed, 19 Apr 2023 10:38:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231667AbjDSOia (ORCPT ); Wed, 19 Apr 2023 10:38:30 -0400 Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22C862D66 for ; Wed, 19 Apr 2023 07:38:29 -0700 (PDT) Received: by mail-yb1-xb34.google.com with SMTP id l5so11031563ybe.7 for ; Wed, 19 Apr 2023 07:38:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1681915108; x=1684507108; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Ilxu6Q/jc5aOhDRIt3j6AWcNhm/qlHFPZW+HtjiMVA4=; b=CgkHuBeThgTIDC8QSyU6LY74RfHhExfygsKxzG/Fs3ZzJFDo6+UyPmSpDIpScwEBc5 w74rChawjoSOYO8ExD5NuJQ7gvs/XzwaFhFEEuuBXwDSqwAjX3hUDFMUsN4WjCU9VJ7v l6GjTcZMFqukPCLdoe818esq/uNv1gt4vwtGk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681915108; x=1684507108; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ilxu6Q/jc5aOhDRIt3j6AWcNhm/qlHFPZW+HtjiMVA4=; b=goI7EXCPd5IDUtdQwvIOOglfsZGw0HKAYOQEKDXQZpWIhyths3lLRNGS0Y003dNlP0 DL//163udV5IhZMus/0Mgi30TA5vWBejg/U2vKK8jRdfTDnNCXMrAcJuYib+x1N/Xwwv X9ZQzf1cdqDqQcGMqNnRE4vziJbd9nrtelxmirfABdeneYZPNLa59ryXlScvks4QcyXL eWkLbIXkkeCl1mbOnKJz8/41nWmcfdOP6/vyxZksv7Q+eIXyh0aPQTm2lrHAN6Tlw+0u vZcAp9a5shqerkM+vensqxKsLpL0wOsxh3/dfAxuBHi0WV72Evl+l8A6wVVKZc2CjAX0 mJ6A== X-Gm-Message-State: AAQBX9fgL0LarzGlJ0Ll1xR8WaIvFGk45rp+UJjSCdCAXNLJSxarQYpv G9XNVA5seIUe2WN+cYcFAAhbcOOn/xWCGJ/C6Fv/lA== X-Received: by 2002:a25:cdc9:0:b0:a35:1aa1:b023 with SMTP id d192-20020a25cdc9000000b00a351aa1b023mr126897ybf.27.1681915107806; Wed, 19 Apr 2023 07:38:27 -0700 (PDT) Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com. [209.85.219.182]) by smtp.gmail.com with ESMTPSA id a14-20020a056902056e00b00b8bcaf1e660sm4344140ybt.4.2023.04.19.07.38.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Apr 2023 07:38:26 -0700 (PDT) Received: by mail-yb1-f182.google.com with SMTP id n193so9331882ybf.12 for ; Wed, 19 Apr 2023 07:38:26 -0700 (PDT) X-Received: by 2002:a25:7687:0:b0:b96:7676:db4a with SMTP id r129-20020a257687000000b00b967676db4amr16246ybc.0.1681915105828; Wed, 19 Apr 2023 07:38:25 -0700 (PDT) MIME-Version: 1.0 References: <20230418124953.3170028-1-fshao@chromium.org> <20230418124953.3170028-2-fshao@chromium.org> In-Reply-To: From: Doug Anderson Date: Wed, 19 Apr 2023 07:38:13 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: input: goodix: Add powered-in-suspend property To: Fei Shao Cc: Jeff LaBundy , Benjamin Tissoires , Rob Herring , linux-mediatek , Dmitry Torokhov , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Hi, On Wed, Apr 19, 2023 at 3:44=E2=80=AFAM Fei Shao wrote= : > > Hi Jeff, > > On Wed, Apr 19, 2023 at 8:21=E2=80=AFAM Jeff LaBundy w= rote: > > > > Hi Fei, > > > > On Tue, Apr 18, 2023 at 08:49:51PM +0800, Fei Shao wrote: > > > We observed that on Chromebook device Steelix, if Goodix GT7375P > > > touchscreen is powered in suspend (because, for example, it connects = to > > > an always-on regulator) and with the reset GPIO asserted, it will > > > introduce about 14mW power leakage. > > > > > > This property is used to indicate that the touchscreen is powered in > > > suspend. If it's set, the driver will stop asserting the reset GPIO i= n > > > power-down, and it will do it in power-up instead to ensure that the > > > state is always reset after resuming. > > > > > > Signed-off-by: Fei Shao > > > --- > > > > This is an interesting problem; were you able to root-cause why the sil= icon > > exhibits this behavior? Simply asserting reset should not cause it to d= raw > > additional power, let alone 14 mW. This almost sounds like a back-power= ing > > problem during suspend. > > > There was a fix for this behavior before so I didn't dig into it on > the silicon side. > I can ask internally and see if we can have Goodix to confirm this is > a known HW erratum. Certainly it doesn't hurt to check, but it's not really that shocking to me that asserting reset could cause a power draw on some hardware. Reset puts hardware into a default state and that's not necessarily low power. I guess ideally hardware would act like it's "off" when reset is asserted and then then init to the default state on the edge as reset was deasserted, but I not all hardware is designed in an ideal way. > > If this is truly expected behavior, is it sufficient to use the always_= on > > constraint of the relevant regulator(s) to make this decision as oppose= d to > > introducing a new property? > > > That sounds good to me. IIUC, for the existing designs, the boards > that would set this property would also exclusively set > `regulator-always-on` in their supply, so that should suffice. > Let me revise the patch. Thanks! Yeah, I thought about this too and talked about it in my original reply. It doesn't handle the shared-rail case, but then again neither does ${SUBJECT} patch. ...then I guess the only argument against it is my argument that the regulator could be marked "always-on" in the device tree but still turned off by an external entity (PMIC or EC) in S3. In theory this should be specified by "regulator-state-(standby|mem|disk)", but I could believe it being tricky to figure out (what if a parent regulator gets turned off automatically but the child isn't explicit?). Specifically, if a regulator is always-on but somehow gets shut off in suspend then we _do_ want to assert reset (active low) during suspend, otherwise we'll have a power leak through the reset GPIO... :-P ...so I guess I'll continue to assert that I don't think peeking at the regulator's "always-on" property is the best way to go. If everyone else disagrees with me then I won't stand in the way, but IMO the extra property like Fei's patch adds is better. [1] https://lore.kernel.org/r/CAD=3DFV=3DV8ZN3969RrPu2-zZYoEE=3DLDxpi8K_E8E= ziiDpGOSsq1w@mail.gmail.com