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 0FB47C27C4F for ; Thu, 13 Jun 2024 17:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=C2efWZ3QfMgnmV01QprpcWqraQeyfS4if8/O5iUDaPo=; b=p8FoiKMLw+m6QeGoZdtzlZP3wp FU6evBj6FJfqU3b01hNCIjPR67jQMXrcvpjKqg0uMlHkV6/bNiD9x4JgSeLBTKMgAWphBKadPF+Ol 0X/PtWTiXK0dG2y9xixILUfR35OXONWbYts9K2jgaDhJRHw/mNjUvsGebf9k+av2TSFm9rEHdFDTZ WM7OIwqPlBeXZ2Tx+rIp82FKwxtEerN0nOAQNd2aqSi0/06UDZcPla8DdUYPIsXHI6oJX84AspuhD lrTK5hfTtJ2jIPbEuPWCSt9TE3WicGRY+eJ76qDxZ31ku1XFA+d4KnV7/3Ux088bhIDslQaJZE+qQ qeu9SrcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHoMS-0000000HXyM-2BR7; Thu, 13 Jun 2024 17:35:44 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHoMP-0000000HXxu-2fOA for linux-arm-kernel@lists.infradead.org; Thu, 13 Jun 2024 17:35:42 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D423F61CD6; Thu, 13 Jun 2024 17:35:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4ED7CC2BBFC; Thu, 13 Jun 2024 17:35:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718300140; bh=dqedMryWpbzl0sexd5pEVn7GsbPtPLflViufTU17X2o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=srvTU2CwwxSfnEgA+OEIWVKvmvAZzBfMTfliMCDbBnbax16Ci4Uya6fkokhEoQCjQ 80u5y6cK3vN/UD92pSZceNgfXW5mcFtsd7LRqKxTKlkmwkTk2x1BPUnChwHm3zHNJ5 MRJPyAbq8UmDq4j+6fVcpIxVgTnRJuI6N7Djfm2mSELEkzey5+3Lv4Zahp5KLv0hsO ucYOgLSaV2jHyU2zh68B9lypdYsuk0csfaFTTbxYN9HCFOsnreNvWgkzj7huab+Smn jsEaZV9wkPDXNfrkUzxH81V9dSpaRo4P1qCEpfZLhboJ+RzmryTKXOUC6bPNnqLq0r rLum7QWy4xzKw== Date: Thu, 13 Jun 2024 11:35:39 -0600 From: Rob Herring To: Elliot Berman Cc: Bjorn Andersson , Konrad Dybcio , Sebastian Reichel , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Andy Yan , Lorenzo Pieralisi , Mark Rutland , Bartosz Golaszewski , Satya Durga Srinivasu Prabhala , Melody Olvera , Shivendra Pratap , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Florian Fainelli , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v4 1/4] dt-bindings: power: reset: Convert mode-.* properties to array Message-ID: <20240613173539.GA2038101-robh@kernel.org> References: <20240611-arm-psci-system_reset2-vendor-reboots-v4-0-98f55aa74ae8@quicinc.com> <20240611-arm-psci-system_reset2-vendor-reboots-v4-1-98f55aa74ae8@quicinc.com> <20240611204001.GA3026541-robh@kernel.org> <20240611160619020-0700.eberman@hu-eberman-lv.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240611160619020-0700.eberman@hu-eberman-lv.qualcomm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240613_103541_776638_DE12E574 X-CRM114-Status: GOOD ( 21.74 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 11, 2024 at 04:23:00PM -0700, Elliot Berman wrote: > On Tue, Jun 11, 2024 at 02:40:01PM -0600, Rob Herring wrote: > > On Tue, Jun 11, 2024 at 08:35:13AM -0700, 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. Users of the > > > reboot-mode schema will need to specify the maxItems of the mode-.* > > > properties. Existing users will all be 1. > > > > > > Signed-off-by: Elliot Berman > > > --- > > > .../devicetree/bindings/power/reset/nvmem-reboot-mode.yaml | 5 +++++ > > > Documentation/devicetree/bindings/power/reset/qcom,pon.yaml | 8 ++++++++ > > > Documentation/devicetree/bindings/power/reset/reboot-mode.yaml | 4 ++-- > > > .../devicetree/bindings/power/reset/syscon-reboot-mode.yaml | 5 +++++ > > > 4 files changed, 20 insertions(+), 2 deletions(-) > > > > > > diff --git a/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml b/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml > > > index 627f8a6078c2..9b9bbc0f29e7 100644 > > > --- a/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml > > > +++ b/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml > > > @@ -31,6 +31,11 @@ properties: > > > allOf: > > > - $ref: reboot-mode.yaml# > > > > > > +patternProperties: > > > + "^mode-.*$": > > > + items: > > > + maxItems: 1 > > > > Drop 'items'. Otherwise, you are defining constraints of a matrix. > > > > If I do this, I also have to add $ref: .../uint32-array as well so > the property can be picked up as an array type. Let me know if this isn't > right, otherwise I'll send out a fixed version in a few days. Ah, I suppose the tools get confused with what to do here. That's an issue I'm working on addressing. The issue is everything is a matrix because without other information for a property we don't know how to decode them. But with the schemas being fairly complete now and the move away from DTB->YAML decoding, we can decode properties to the right type. One issue to switch over is places where this 'everything is a matrix' crept into schemas. I've been fixing these. The above is an example of this. So for now, just drop 'items'. It won't enforce anything, but once we switch over it will. Rob