Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp310605lqs; Thu, 13 Jun 2024 10:35:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW6PuerYSQxXq6aqk0xWi6SkYKehd4Z4Ik22LU36CxqT+bsuyL1SHyKkYpm2sJqLBsUNmnWNdq5CY1bYbIqPz+gCb0PS77jfMcfB0ileg== X-Google-Smtp-Source: AGHT+IFuZ+8XR/43fB24kzJEJ2ZigOQnN4ya43T6AT20qk+bcSMcV22ENxjL31rmsJgktCrp59e6 X-Received: by 2002:a05:6e02:216f:b0:375:c443:9883 with SMTP id e9e14a558f8ab-375e0e9e29bmr2274835ab.21.1718300151777; Thu, 13 Jun 2024 10:35:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718300151; cv=pass; d=google.com; s=arc-20160816; b=xeAD0zQvUnyMXbGWhZ8j9B0D1qfKwHU7oqDKFOQWdO7/JsPzsarjgus2JyBf+T8NQU ag0O2PtWIY1PZUHxV2wGxgyabWnhNm4ozzxoY0louLIDXZsuH5b7xIHdfwJUwDHhTXIO ga8uL9LrmhTI6EL9daJbIr0lOk3LRwtxAmZ26FVX8XPoS3KgiKSoZGEoQNECytxMl7Sm aw3kuUNeOBC6LB6HJF21hvelWSnpzSh60K9Y4Io5BB7ZKxoQ0QxQW5Q4qh0OVNJ0+lY0 9/43PYEtx20bDZ4nj65lRVpID1/5J1j+7cVGa+esFxm5PbJ97nxthmmOTEtMU85q7D6I Zxuw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=C2efWZ3QfMgnmV01QprpcWqraQeyfS4if8/O5iUDaPo=; fh=+2VOlwdflj/f5nGOChAmjJnmlQS5+mFJN9QMJRnneTA=; b=aucRhjFdFVpfY3dhJYWOYTybD51WBR0+wmOip4BEATkJrdb662CBmiud2mtGflfYGl 0PyPatEV98RMLENr5gcfTmVM6afoks3ORNkBti3U44n7k+p9BCUFKHuZcUaV3yXftK6e OLpvfsJyseiU4gZNaazPzscpMRtasvIZuBA09wExOghJ7jO0oISI91ewrHdeDUdF552o IIX3jJOCl7GbdD2919DtyiE4unuv1yi1J/0EYMZFYtL45jBIj5qTzCSFiOHct2D/fIAA lmRknxwbg/boNc+i18kIpWCD0epWC0FptHepV6ag+SEmyGPmZ+H3jmakab04CBw/tDFZ vVQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=srvTU2Cw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213756-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fedd4f4102si1861849a12.173.2024.06.13.10.35.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 10:35:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=srvTU2Cw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213756-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5FE01282E68 for ; Thu, 13 Jun 2024 17:35:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA60814A0BF; Thu, 13 Jun 2024 17:35:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="srvTU2Cw" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14F33149E06; Thu, 13 Jun 2024 17:35:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718300141; cv=none; b=rc5w9oQT57hC06DLrl+e1brVr3P87PwB88hvmsk2Y4viVax3/2y9yGiwNqSG4mRb+RYdqDA9lKnDpFufK0LpAARYM5rBFyjiznH0Q1rzKgkOlK4VQ5WxupqAyEfBq9GEtDPmNJn1VAX36UbMlaCyxaLfCWrcxf2x8JzmQ25i/g0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718300141; c=relaxed/simple; bh=dqedMryWpbzl0sexd5pEVn7GsbPtPLflViufTU17X2o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FYgJCWu4QtMKUiMwmq1BZTuyVlI7C3X6TPeyacIq+dLwIGWYbNWcL/GZxIXd4CBeQ7c2X7kA6438w7aJpxmqzaNOVyLcxlT0egphLr1phhPnfEkmdlC2DAatEERnSDmeyljHin5tXDuhcW/16rDoevXiqkByRyXT5lVuhEhF/BM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=srvTU2Cw; arc=none smtp.client-ip=10.30.226.201 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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> 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