From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E92F5C2BB3F for ; Mon, 20 Nov 2023 15:28:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rzamKHNvqxFBwRQFPqXG8+vKA6xccXhvc6OqlFClFIk=; b=28/qiGVHL09kg7 0EKJtlYBIYjwDhZffxgIcXdNoEaccRvvk30J9ash2RgDGDB2eWx/8EVz6PoesrZ4Jrhwj5iKL0yVL 51vMAkmnZAMzfj144XJWvJepSTROrWPE6VG284higwanCmmLiU0Rlop3AG6L+QzivcJi+/fFXZW2c l77Fp6JTCrhxee9BDNupxVIElidGl40Wixl8JRf6wPyiuRfjgWHqri52FHtMoldaE6PXjW4fmGA7n vg/TFeiTR2SPCORxQQXbTa4kv8eNXY/i0aJraLZzDUCo5ru3wmRMR7I9GIclpufWmoY5fo14k96yI f5/iVpeZV3tSO/JCxtOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r56Bh-00CdzF-0E; Mon, 20 Nov 2023 15:27:49 +0000 Received: from mail-il1-f174.google.com ([209.85.166.174]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r56Bd-00CduB-2s for linux-arm-kernel@lists.infradead.org; Mon, 20 Nov 2023 15:27:47 +0000 Received: by mail-il1-f174.google.com with SMTP id e9e14a558f8ab-3575287211bso13961595ab.1 for ; Mon, 20 Nov 2023 07:27:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700494060; x=1701098860; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HgW5SEQguH7SJ47xdmCLdbSDRQKiHAPQcIcWrlriANo=; b=SPMVbjdxr57KIDs2jq0/AHN0QjK6AS/ssMQUbH/nbUTnO9Jjt+yWDErHyxHZLHM4sR 2iPC/y/sOw933MNGa06/hn/6AeZNL7FYe0AbEyUY1e5tktqsomu/K8ijjJsFTU/AdfRj Ygi4rWvkXHw/ZGN1it84YnwdlrakwKWn8TOjizeSbAAWRsmGAhZ3vD1BiuoMLhC321gN TMae9xy5kjPfKRIymoF9VaTiVxcL6xi9xdepb2Bt8rMuuPbESqSyEb/J7CIsRk1dg9QJ Sxo7jHlBzFygTO4yN3DUFucwoEmsvh9XQry/wkKHOskZVVbOOTLnbnlRLE5wwJnOgpmw rQNg== X-Gm-Message-State: AOJu0YxlXGa/9ARt3vikG+ax58D16Wend8yMrCIP9of/naIbCBuZokk0 l0n6POVPLZ8xDa15fOyX/g== X-Google-Smtp-Source: AGHT+IFBGjZpsv53gTkd10OuGcHTWcMkLDOJQ6232YyHYlHy2VRxBiMBYntlRcIwnf3DwcR58AGyCQ== X-Received: by 2002:a05:6e02:b4d:b0:35a:b6ce:cedf with SMTP id f13-20020a056e020b4d00b0035ab6cecedfmr9531304ilu.13.1700494060141; Mon, 20 Nov 2023 07:27:40 -0800 (PST) Received: from herring.priv ([64.188.179.252]) by smtp.gmail.com with ESMTPSA id h18-20020a056638339200b00466601630f4sm408478jav.174.2023.11.20.07.27.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:27:39 -0800 (PST) Received: (nullmailer pid 2044075 invoked by uid 1000); Mon, 20 Nov 2023 15:27:37 -0000 Date: Mon, 20 Nov 2023 08:27:37 -0700 From: Rob Herring To: Elliot Berman Cc: Krzysztof Kozlowski , Conor Dooley , Lorenzo Pieralisi , Mark Rutland , Satya Durga Srinivasu Prabhala , Melody Olvera , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Florian Fainelli Subject: Re: [PATCH 1/3] dt-bindings: power: reset: Convert mode-.* properties to array Message-ID: <20231120152737.GA283159-robh@kernel.org> References: <20231117-arm-psci-system_reset2-vendor-reboots-v1-0-03c4612153e2@quicinc.com> <20231117-arm-psci-system_reset2-vendor-reboots-v1-1-03c4612153e2@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231117-arm-psci-system_reset2-vendor-reboots-v1-1-03c4612153e2@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231120_072745_951755_78B43821 X-CRM114-Status: GOOD ( 19.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Nov 17, 2023 at 01:18:46PM -0800, Elliot Berman wrote: > PSCI reboot mode will map a mode name to multiple magic values instead > of just one. Convert the mode-.* property to an array with default > number of items limited to 1. > > Signed-off-by: Elliot Berman > --- > Documentation/devicetree/bindings/power/reset/reboot-mode.yaml | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/power/reset/reboot-mode.yaml b/Documentation/devicetree/bindings/power/reset/reboot-mode.yaml > index ad0a0b95cec1..2c786e783464 100644 > --- a/Documentation/devicetree/bindings/power/reset/reboot-mode.yaml > +++ b/Documentation/devicetree/bindings/power/reset/reboot-mode.yaml > @@ -28,13 +28,16 @@ description: | > > properties: > mode-normal: > - $ref: /schemas/types.yaml#/definitions/uint32 > + $ref: "#/patternProperties/^mode-.*$" > description: > Default value to set on a reboot if no command was provided. > > patternProperties: > "^mode-.*$": > - $ref: /schemas/types.yaml#/definitions/uint32 > + $ref: /schemas/types.yaml#/definitions/uint32-array > + # Default to one value. Bindings that reference this schema could override. > + minItems: 1 > + maxItems: 1 There are no overrides in json-schema, so this won't work. It happens to work though. It has to do with how we process the schemas because every integer property is decoded into a 2 dimensional array. So we process the schemas to convert schemas for scalars and arrays into a matrix. This hit a corner case where we bail on doing any fixup when maxItems is 1, but really it should be transformed into: maxItems: 1 items: maxItems: 1 Which would then fail on your case with 2 entries. You need 'maxItems: 1' everywhere just 1 entry is expected (e.g. mode-normal) and no constraints here. Rob > > additionalProperties: true > > > -- > 2.41.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel