From patchwork Thu Oct 26 14:48:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 158575 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp731671vqb; Thu, 26 Oct 2023 07:49:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE1E9hKG09cvK+sBnyvHaQyBCV9CxZtxtnYBULNPcZejSAgcbY45+IqxvaGVNZpbQA2Dq2O X-Received: by 2002:a25:7105:0:b0:da0:aa1b:80f3 with SMTP id m5-20020a257105000000b00da0aa1b80f3mr3862079ybc.10.1698331791389; Thu, 26 Oct 2023 07:49:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698331791; cv=none; d=google.com; s=arc-20160816; b=B1iWCM56Qjmg3uJgxYBsOmrAlevBYKI/ZbuG5Zv2A153HMCwC6qxtw9CG9pjbyYCMW PTb6AFJebHG62Ptjuhg5jrObHSMT2bNBmS4CX8t6VJN+icn2Z05a7BR/pdCK9UXcU/Rl zfQdsKfnjcwiHchUMEh9UlNzZYIqrrqYrfzKlY67BitxZyhXystrK9NQJ7C628pg522P P+CrxyXzCF54mcwgekm8sZCy4kIc4Hl9F49WSL6upybO866cDEfP8iGVMwtMpfol3Hd2 sHzUnjQdFc0ddYFzeryUuJ7E4WdcEsLF8iHVspBHzIw2SjBeX+3tyqu5MNQ6A4kh1kpg 5Vxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Uekl2pKBNpqO7PfDuK2I4RyNq5HhhDY5rLzSVuDboDg=; fh=04ly7V1xWE1eBTBwtRUQiwjHX8ICozxkXNJpuSLZLOA=; b=MmRot1pYUdI4wIIwgcu2kUv9GaWJ8ZzlJK8tDhIIs8JE/UamI+07rzfSwIgTBmb5N9 yhUEBT5T2uIu32FasL1zeGGVCQpaTczAsVsksPo+nYdYCBS4BmVAluxt+imKOaWcTORF 7RzU/8i1LM5pr2n8zq9RBbbeylWwbGiMZopo3fDHPB8F7JbM0B1usT2ttk88cyg4rqGW lk6xKdKuyULvseUhXsWp/JPYhrcokR8ZCLz4ur08AcxUUZR8vUJBEWij+jI/TeEqJtYh k2ABpHB+W4RUOy8y3DsCbgPCOx+zxzVGGBKuCPKpBOTx/Ol8nvx0EVQcmR0kdPpWiE7Z gKpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id b129-20020a253487000000b00d9a3739239fsi13632385yba.313.2023.10.26.07.49.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 07:49:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 74DF682D8781; Thu, 26 Oct 2023 07:49:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345378AbjJZOs4 (ORCPT + 26 others); Thu, 26 Oct 2023 10:48:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235107AbjJZOso (ORCPT ); Thu, 26 Oct 2023 10:48:44 -0400 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 592281B3 for ; Thu, 26 Oct 2023 07:48:41 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qw1es-0005Zs-2A; Thu, 26 Oct 2023 16:48:26 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qw1er-004Qq7-KK; Thu, 26 Oct 2023 16:48:25 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1qw1er-00H3Y3-1o; Thu, 26 Oct 2023 16:48:25 +0200 From: Oleksij Rempel To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v4 4/5] regulator: dt-bindings: Add 'regulator-uv-less-critical-window-ms' property Date: Thu, 26 Oct 2023 16:48:23 +0200 Message-Id: <20231026144824.4065145-5-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231026144824.4065145-1-o.rempel@pengutronix.de> References: <20231026144824.4065145-1-o.rempel@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 26 Oct 2023 07:49:41 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780829956894973697 X-GMAIL-MSGID: 1780829956894973697 Introduces a new devicetree property to specifies the time window (in milliseconds) following a critical under-voltage (UV) event during which less critical actions can be safely carried out by the system. Less Critical Actions: - Logging the under-voltage event for later analysis. - Saving less critical data that may be useful for diagnosing issues or for audit purposes. More Critical Actions (post the less critical window): - Initiating procedures to properly shutdown hardware to prevent damage. The 'regulator-uv-less-critical-window-ms' property is crucial for conveying board-specific hardware characteristics, not for enforcing a certain policy. The time window represented by this property is derived from the physical attributes of the hardware like the capacity of on-board capacitors, the power consumption of the components, and the time needed to safely shut down hardware to prevent damage. These attributes can significantly vary between different boards, making it a board-specific property rather than a policy directive. By providing a precise representation of the time available for less critical actions post an under-voltage event, this property enables the kernel to make informed decisions on action prioritization, ensuring that essential preventative measures are taken to avoid hardware damage while also allowing for data capture and analysis. Signed-off-by: Oleksij Rempel Acked-by: Rob Herring --- .../devicetree/bindings/regulator/regulator.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/regulator.yaml b/Documentation/devicetree/bindings/regulator/regulator.yaml index 5b8d55f7c43b..1ef380d1515e 100644 --- a/Documentation/devicetree/bindings/regulator/regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/regulator.yaml @@ -186,6 +186,14 @@ properties: be enabled but limit setting can be omitted. Limit is given as microvolt offset from voltage set to regulator. + regulator-uv-less-critical-window-ms: + description: Specifies the time window (in milliseconds) following a + critical under-voltage event during which the system can continue to + operate safely while performing less critical operations. This property + provides a defined duration before a more severe reaction to the + under-voltage event is needed, allowing for certain non-urgent actions to + be carried out in preparation for potential power loss. + regulator-temp-protection-kelvin: description: Set over temperature protection limit. This is a limit where hardware performs emergency shutdown. Zero can be passed to disable