Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5628041rwb; Wed, 7 Sep 2022 05:55:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR6WYUSip3Z+PB0Q36lAzFN5CgUCrzA/vdOtay2LFLIfi7oltmM2ccNnEuXJ/pCa5RmODERv X-Received: by 2002:a17:907:6293:b0:769:9dfc:10eb with SMTP id nd19-20020a170907629300b007699dfc10ebmr2310490ejc.191.1662555317514; Wed, 07 Sep 2022 05:55:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662555317; cv=none; d=google.com; s=arc-20160816; b=0t9dDxpRg4aeqU1laoc7kOVDo3p/80FK/Rz784WK/ClE1+Ek/ss8CIhuaVMbw3P8jK GDCXgciri96XvQKmuAZooJZo7LqCEBJL/JP0FA4hEF1Jdc2gxiYZ183iGzQyWgxGiUMH HtpPgLazytGKdqMVTWFTQfSPsnKyWrFSWrlSY3MNd3xtO18hUpgEZOLz4PpN0/1++Nrg 4ICNoaRBS/6RxZU/HfmugQjL+oreK6QeraxDE+liWl2ZYD6kwNO2F4h2uObFjgnrVE2u Eb8JzzHa+fAYc50legYWDUo3m75j5METZklYXbE8V3YaxUm3PHJf6ml/jhusVP6+BadD WGLQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Ozxna7OXRQ1OVszMUY0d4yr30/luJFmuNl59JFfJkG8=; b=d9VSBmzZVniG0TZ//q1B6WdeU6BgvkRCQnAIEYovIMQ3c7xPFQu9SQ5BPVqsBagV3l Hi6kfuoBkWIBTxhM4P6heuKIcy+l4clnAwL/6QI9Jzso4RLuarhLp0jdZ4figA1onZs5 X4sOtO8nq6jCnDXf9z8kp74aEuHhPNEHGOxipTPXNJRbIH/GBPkrtvGgyyXlEIFyxEq+ Af68PrksUloBGbKBwFsU1ndHqBlaLEEARmEXfTVF0vOWT/lFQxjgIVgYhuC1GUuNuEj5 Pt985UsbA4ZwzR3FIvtW24ubA3sAt6bTpcoMghspKUN2UyWDyr1DtGGVMmDunsgCnSbs /kkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QCukGyHB; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc20-20020a1709078a1400b0073156b6fe1csi11744560ejc.799.2022.09.07.05.54.51; Wed, 07 Sep 2022 05:55:17 -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=@linaro.org header.s=google header.b=QCukGyHB; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229594AbiIGMgq (ORCPT + 99 others); Wed, 7 Sep 2022 08:36:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbiIGMgm (ORCPT ); Wed, 7 Sep 2022 08:36:42 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B2D7B8F2E for ; Wed, 7 Sep 2022 05:36:40 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id w8so22153653lft.12 for ; Wed, 07 Sep 2022 05:36:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=Ozxna7OXRQ1OVszMUY0d4yr30/luJFmuNl59JFfJkG8=; b=QCukGyHBPM9jdduoCbZKDn+hzV/Qcsh4gYl+qhJDpzhYaTsmS83u1eLps741qFH6co f4nW98pdQ7PoYlb1rFfRQVxLW0jz0ZudXoJNNfglGUTIacLM+lAesgbKCN68N38/NuhJ k4rm4G/h9n8TXqEd9LFifaq4SQDi/beubCM0BYZQGCrQWqjbtkJEIY7qd6l6lik/tt14 Z3/xYJV3NQMjrTIOiX754fzZ2EhGWSXhgM1ZrCgv7MnOf9XmtBTWDNdgwNR/FjiYhqFq EZ7AWpPN/R70PgPgWHvLPi4WJRBtX74IUR/nghjWARqnbrx4yrDrxdqYqeOsDWAROcpH u2Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=Ozxna7OXRQ1OVszMUY0d4yr30/luJFmuNl59JFfJkG8=; b=gNTUvJkkCei6gI7N5cXf10+gxfzQYpAeK7DHB2S1PIoIhpHy7SUyEvHChSU5MiUZdB cFt6BaihQdbOPM5C6XtE5MNkdvfRwe5RlZN11LNuanXymVAC5iXZ+JBexjbDGO/tKi3N VLLMXf/v+H/r3PrOm+YwyInV9sPZgYNSWM0bcyZId8GXM1ufOniseqoRvhwZmMPfva3H 96wLVKY14W3aPEmoxnkWyY4GoATcZEutIsNWIbX5Y9+LdJW7/qButev0E7s+A8WDRBzo Agry8V/eGnKy5GujobhXOJxKZdQy5xu9R3DqndCcVNg7xKbwNcwmdsKTpF+w0MczjX3w 0hOA== X-Gm-Message-State: ACgBeo3IP/bzrFMraQ7L2szroilL1faBlwT9vuday6mQ3Raisyza9F3X M3G5sz9TZ8yEmGg+AdAP6yQSOA== X-Received: by 2002:a05:6512:239e:b0:497:a36a:9ae with SMTP id c30-20020a056512239e00b00497a36a09aemr1084228lfv.378.1662554198185; Wed, 07 Sep 2022 05:36:38 -0700 (PDT) Received: from krzk-bin.. (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id b7-20020a2eb907000000b00261b4df9ec4sm2624062ljb.138.2022.09.07.05.36.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 05:36:37 -0700 (PDT) From: Krzysztof Kozlowski To: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Krzysztof Kozlowski Subject: [PATCH] dt-bindings: power: reset: restart-handler: add common schema Date: Wed, 7 Sep 2022 14:36:30 +0200 Message-Id: <20220907123630.57383-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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=unavailable 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 Add common schema for restart and shutdown handlers, so they all use same meaning of "priority" field. The Linux drivers already have this property and some systems want to customize it per-board in DTS. Signed-off-by: Krzysztof Kozlowski --- See also: https://lore.kernel.org/all/8fe93da3-f768-16ae-7025-1cfa97a42b27@linaro.org/ https://lore.kernel.org/all/20220831081715.14673-1-pali@kernel.org/ --- .../bindings/power/reset/gpio-restart.yaml | 13 ++------ .../bindings/power/reset/restart-handler.yaml | 30 +++++++++++++++++++ 2 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/reset/restart-handler.yaml diff --git a/Documentation/devicetree/bindings/power/reset/gpio-restart.yaml b/Documentation/devicetree/bindings/power/reset/gpio-restart.yaml index a72d5c721516..d3d18e0f5db3 100644 --- a/Documentation/devicetree/bindings/power/reset/gpio-restart.yaml +++ b/Documentation/devicetree/bindings/power/reset/gpio-restart.yaml @@ -25,6 +25,9 @@ description: > inactive-delay, the GPIO is driven active again. After a delay specified by wait-delay, the restart handler completes allowing other restart handlers to be attempted. +allOf: + - $ref: restart-handler.yaml# + properties: compatible: const: gpio-restart @@ -41,16 +44,6 @@ properties: in its inactive state. priority: - $ref: /schemas/types.yaml#/definitions/uint32 - description: | - A priority ranging from 0 to 255 (default 129) according to the following guidelines: - - 0: Restart handler of last resort, with limited restart capabilities. - 128: Default restart handler; use if no other restart handler is expected to be available, - and/or if restart functionality is sufficient to restart the entire system. - 255: Highest priority restart handler, will preempt all other restart handlers. - minimum: 0 - maximum: 255 default: 129 active-delay: diff --git a/Documentation/devicetree/bindings/power/reset/restart-handler.yaml b/Documentation/devicetree/bindings/power/reset/restart-handler.yaml new file mode 100644 index 000000000000..f5d22ca0cd45 --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/restart-handler.yaml @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/reset/restart-handler.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Restart and shutdown handler generic binding + +maintainers: + - Sebastian Reichel + +description: + Restart and shutdown handler device is responsible for powering off the + system, e.g. my cutting off the power. System might have several restart + handlers, which usually are tried from most precise to last resort. + +properties: + priority: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + A priority ranging from 0 to 255 according to the following guidelines:: + 0: Restart handler of last resort, with limited restart capabilities. + 128: Typical, default restart handler; use if no other restart handler + is expected to be available, and/or if restart functionality is + sufficient to restart the entire system. + 255: Highest priority restart handler, will preempt all other restart handlers. + minimum: 0 + maximum: 255 + +additionalProperties: true -- 2.34.1