Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp266265rwn; Thu, 8 Sep 2022 00:57:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR453arITsWzZu2OJFHcSuve7vMF0Sgu9Gk3WRS+lgLHc78wLYXDywgZMTgtoWlAzrG02hSS X-Received: by 2002:a17:907:868f:b0:730:bc1f:a8d8 with SMTP id qa15-20020a170907868f00b00730bc1fa8d8mr5362491ejc.106.1662623828392; Thu, 08 Sep 2022 00:57:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662623828; cv=none; d=google.com; s=arc-20160816; b=y28TldORqzDDDNLFGizsUBYo5Su5g3U9iSlUFK7EZFUmR175PmNxH2bkrbD6HBhO0g tiCxbOknx3esP5d6N8KLkepHjF2aX6S/X/RLEts0OgnZvH5DpbIY+oMAbHT7JmqQTgNR azdjAJFgMqM/wQ747PTw77WvltB+dh88Ys14/RGmNIGswj++nLCMdpvpRGDSG0oFLszc li+9++8xczmnJ0plpI2T6YZa9cjkgW6nxFU74wc4fDycfjOz8g73ATH2I6eP2RfqgLgI FnGjXhSZLaSm0tEXCFuXThmF6iB9oMOtEQJgYCurDvp0PsUQb1HDy4C8qCd8j9oUlBPL yMYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=/zRU8A5zoUoera6+7kmx9n/i4jIslUbut0IRuDzdvno=; b=Lh4KM/yPle2GgmfIiteSWLJXrq6nz0XE2AuviNVbJyU6KW+NC5d5BqRZQ/WkmWdFcL /f4G8W8AT/wWWsL1sHfgl9uuTqBftOKtuE1d4vqvRjSCE+nUXNSUofdh52vJaHN1LgLN sppTX3mjxurFO/fmxxCxnNhFz3XrI+4MoOeJ7IF1cH2sbcLKW7t5a8Q5meCXxY5kG6jA 48fPsHtgKft2jBGPnMixlnjoRu6l4fHvCqNQeUNWXNIv3NfOtNhf3OHIVPmIp/VTVPqV yV1OnOslwLkid7gom47eR50NVfr8JvpGA3St14WNAz3vH1/43xIomqxvAdQNfo1E8v4M OJkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SkAAEinM; 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 u12-20020a056402064c00b0044ee88a08b1si4902218edx.277.2022.09.08.00.56.41; Thu, 08 Sep 2022 00:57:08 -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=SkAAEinM; 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 S229736AbiIHH2p (ORCPT + 99 others); Thu, 8 Sep 2022 03:28:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230225AbiIHH2e (ORCPT ); Thu, 8 Sep 2022 03:28:34 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C48A2ABF0C for ; Thu, 8 Sep 2022 00:28:32 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id bt10so26302813lfb.1 for ; Thu, 08 Sep 2022 00:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=/zRU8A5zoUoera6+7kmx9n/i4jIslUbut0IRuDzdvno=; b=SkAAEinM04H9PtwZ1jj8CzoAqhQTTLn94foHWPoddRmeWSz3LGkamHEXOymO2VqH0X fl3NIuxXYFvv9LRbI7VnhjD2S32YGC7l5NKPKPop3wNgSMQAaphzCUEF+/EbISrWfkxY TIsO7nr+qloe3bTQgZVnZmYx8sGTn0/Fk74P4QOqAaozAIErcI/ri/6x9TDRzWpbmzX2 tIlRUs+qYmGr/nFw0B3KJvb+BncgRP3BO/e3hDX5ccoP08kwOWl/1Rxv8bXBTWjvzktO unmC71LY1ec24YDw7ZSDvYiEkd5H8n7p51/YK62/XbpDFj6KmTGN5mOq5wzihZp0v635 pYVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=/zRU8A5zoUoera6+7kmx9n/i4jIslUbut0IRuDzdvno=; b=7eDejcJslwP97Xu8u2fweWwJZHIF6kihlhb/ux6/r0CbmNgWp5R+DjnOvlxcc3kXBu 7gBVY/Gcl74/UA08NswkLfEf8XK/K2/GalLF6HEVJ/DJt7ONahMxtK1bxOArUy6hpnSU IboXoQEwe5/Qd+JeiySpfPGVythzkwX2uzaBTgffOo7021YmY4k0npM3DPkcHAZ2Cs1h uD0fuDioXz7Lw1vrKfBRrwkmyukXZlaIZSGLmkQ1ucyUNo1L2OybXztQ6IkS1iPT0bDW 6FWlso9TeEiqN9P3w7pkodw2jzc5q8cuMHudo5A+KAPZF4Kxksxf87qW8lL2NMQzSY+x jAQA== X-Gm-Message-State: ACgBeo058LBnGkXQo1Hao6+I/H/1yTKWelMab0PjF5f6sI1W0oIU/wJt qMdMVAkJMXT3/ikqzELK3z2KUw== X-Received: by 2002:a05:6512:139c:b0:48f:da64:d050 with SMTP id p28-20020a056512139c00b0048fda64d050mr2094541lfa.268.1662622111120; Thu, 08 Sep 2022 00:28:31 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id a9-20020a196609000000b004946274b7d6sm2914742lfc.166.2022.09.08.00.28.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Sep 2022 00:28:30 -0700 (PDT) Message-ID: <219597ff-a409-e19c-b03f-86885d6825c8@linaro.org> Date: Thu, 8 Sep 2022 09:28:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH] dt-bindings: power: reset: restart-handler: add common schema Content-Language: en-US To: =?UTF-8?Q?Pali_Roh=c3=a1r?= Cc: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220907123630.57383-1-krzysztof.kozlowski@linaro.org> <20220907163218.aja4pazw3sbxnoop@pali> From: Krzysztof Kozlowski In-Reply-To: <20220907163218.aja4pazw3sbxnoop@pali> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 On 07/09/2022 18:32, Pali Rohár wrote: > On Wednesday 07 September 2022 14:36:30 Krzysztof Kozlowski wrote: >> 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 > > IIRC priority is signed integer number, not unsigned. Although technically in the kernel it is int, all existing kernel users assign here unsigned number and existing bindings were unsigned int, so I don't think there is benefit to change it to signed. Best regards, Krzysztof