Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2902178rwa; Mon, 22 Aug 2022 16:31:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR6M8v50s4x8qte1YEYVaHq0g4CHZ79qyiFOSF2rd0OzIDWslJQU6gJ/u6XkbF+N1m1P0Hzr X-Received: by 2002:a17:902:d58b:b0:16d:c9ff:3c26 with SMTP id k11-20020a170902d58b00b0016dc9ff3c26mr22082737plh.10.1661211081577; Mon, 22 Aug 2022 16:31:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661211081; cv=none; d=google.com; s=arc-20160816; b=u9n53u/JAZaFTe32R+VKC5xWOkJujGie+TN94jQQKbNWV46sHgSF5WN1r0mts56ZwT c8lKXbHohs4QRcASYcNt1G5WueAs+VZjDUJj7T/5M4Mn6xQEH/semEo6azxgRRiiR2DF QZBSDCrWxS+NrFO76lF2CXUnU1lDY9c8ay+97HzrQSXZYgivbxIkkpRzyPpdASTaK/Rm QNSHve5yvQiJzZS5FSqR3iA/vc0eB5Wx8VTc7JSsWj77Hgp7ppWLRgqZOMqrsis9yVN6 mFG982mPurMYr9PeFRdg+qEVEDOQfcVYMHtSwNZd6yHg1ZD2UQbdl16pO30bdoSc2fm+ 90EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=ZQcp0BRRM98lOS/g0KHNAVFcxGrlDNSNcE9n5lyzj74=; b=lysuUufMmchHBALiCb/BulnkikdPLiZCdz8BgVNhI1HLE3OitVnJDota6dEpTe+S43 DUA8aSkPES5us5eUKh8is+076t3WScV0+Z6DFN1IVxnm7uYBomhxbT4PffPzAzekBXbc J2bqKzjBmM0ex2NBkLN1lDMEbZRvo6tE15B5gn6ZOTAoQfmL0w/I9yUi+Kv6lLm6lOkx AXQDth00H/BEL8yNCeiOBTKCi0K8Z2A91uh7a88ndAY1ZVWVQtdx/0EGRPVLT0yXKRXL hzzzkD4lsj7ebkBJQ4tIajImtUV137Z5eFymkGXCsI+FN4yk17l0f6pPBdV98d68jRZg puBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AY3JnAa0; 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 n8-20020a170903110800b0016ecdb9d821si15095334plh.603.2022.08.22.16.31.10; Mon, 22 Aug 2022 16:31:21 -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=AY3JnAa0; 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 S238283AbiHVW6S (ORCPT + 99 others); Mon, 22 Aug 2022 18:58:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbiHVW6Q (ORCPT ); Mon, 22 Aug 2022 18:58:16 -0400 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 532FDB4A for ; Mon, 22 Aug 2022 15:58:14 -0700 (PDT) Received: by mail-ot1-x32c.google.com with SMTP id h9-20020a9d5549000000b0063727299bb4so8714570oti.9 for ; Mon, 22 Aug 2022 15:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:user-agent:from:references :in-reply-to:mime-version:from:to:cc; bh=ZQcp0BRRM98lOS/g0KHNAVFcxGrlDNSNcE9n5lyzj74=; b=AY3JnAa0u0PCO/OLlstQQme7k5X4CjbQb4LyJxjNuFarcLkWEhPvAXKaWwxdF/n/OH iOWPoBasc1WzdUznFH6n2/15y79SvpqRUs0C8WiWV0Y2mCrAlDiW/QDBO8aF/9+2SlKy 2vJbVtOSadV9XPeuJo7UM/nLUp5U3v1XsXecE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:user-agent:from:references :in-reply-to:mime-version:x-gm-message-state:from:to:cc; bh=ZQcp0BRRM98lOS/g0KHNAVFcxGrlDNSNcE9n5lyzj74=; b=i+/VVtSy5y61c0qYtzAp+Y9k+ynVC/zf7MW+yqwMV4/MhSwIpzwtYCxG//5aFYCAyz yHA27JzI2WVwE8FN7U6fjs2Sbc38xusuojwB6I50dysm4m+fsTjTrIkkjW4v2lEzv0yJ djYZ+qoRK3FjkfGxUE1Yi64GoTdzqafKje2YwfDUuzApYrWtEdqEZZDaychs5QlLzojZ pb3cws95Tg9Zg25K8ucyX9HQJopj1cpsbfpuBt40r6SxGjAXNbJ+weVAv1l2ZUocSYLq CdMsK5GrpvYY3HutREJrThP8rLWMYNTui43Kfarwk8A3+REIht9/6LaVpGE8HORrIgEw s37A== X-Gm-Message-State: ACgBeo0PV9vliUnKtvuDUYNTAYh1phIXvi+im5sNUhneqCax2YA+pUw2 Ciev3XuBadXuz6MHOpzOspEcdwuc6mpgyKJzf6sfsg== X-Received: by 2002:a9d:738c:0:b0:638:9962:8cb6 with SMTP id j12-20020a9d738c000000b0063899628cb6mr8354707otk.73.1661209093673; Mon, 22 Aug 2022 15:58:13 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 22 Aug 2022 17:58:13 -0500 MIME-Version: 1.0 In-Reply-To: <20220822144026.v3.1.Idd188ff3f9caddebc17ac357a13005f93333c21f@changeid> References: <20220822144026.v3.1.Idd188ff3f9caddebc17ac357a13005f93333c21f@changeid> From: Stephen Boyd User-Agent: alot/0.10 Date: Mon, 22 Aug 2022 17:58:13 -0500 Message-ID: Subject: Re: [PATCH v3] platform/chrome: cros_ec: Expose suspend_timeout_ms in debugfs To: Enric Balletbo i Serra , Evan Green Cc: Rajat Jain , Tzung-Bi Shih , Prashant Malani , Benson Leung , Guenter Roeck , Tinghan Shen , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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 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 Quoting Evan Green (2022-08-22 14:40:40) > In modern Chromebooks, the embedded controller has a mechanism where > it will watch a hardware-controlled line that toggles in suspend, and > wake the system up if an expected sleep transition didn't occur. This > can be very useful for detecting power management issues where the > system appears to suspend, but doesn't actually reach its lowest > expected power states. > > Sometimes it's useful in debug and test scenarios to be able to control > the duration of that timeout, or even disable the EC timeout mechanism > altogether. Add a debugfs control to set the timeout to values other > than the EC-defined default, for more convenient debug and > development iteration. > > Signed-off-by: Evan Green > Reviewed-by: Prashant Malani Reviewed-by: Stephen Boyd One nit below > diff --git a/Documentation/ABI/testing/debugfs-cros-ec b/Documentation/ABI/testing/debugfs-cros-ec > index 1fe0add99a2a99..66fe915acd739b 100644 > --- a/Documentation/ABI/testing/debugfs-cros-ec > +++ b/Documentation/ABI/testing/debugfs-cros-ec > @@ -54,3 +54,25 @@ Description: > this feature. > > Output will be in the format: "0x%08x\n". > + > +What: /sys/kernel/debug//suspend_timeout_ms > +Date: August 2022 > +KernelVersion: 6.1 > +Description: > + Some ECs have a feature where they will track transitions to the s/to the/of/ > + a hardware-controlled sleep line, such as Intel's SLP_S0 line, > + in order to detect cases where a system failed to go into deep