Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3712124imw; Mon, 18 Jul 2022 13:07:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sjlgpVrE/gTLSg6o97O6LWo4rhaoVEQdydOL8wQjB2xO+UMgQWn5y9kMHwz9bMNMl0xsmY X-Received: by 2002:a17:907:6d8b:b0:72b:5f51:a9e7 with SMTP id sb11-20020a1709076d8b00b0072b5f51a9e7mr27599834ejc.628.1658174844431; Mon, 18 Jul 2022 13:07:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658174844; cv=none; d=google.com; s=arc-20160816; b=gngSInzkTF6y8G3oCLFoDuwQ6K0vXGVrouns24QSupz7EcCHe5PZ7XTQHQp+/HRql9 Uq+ziagv1y6YMSuo/8gAfKvDYD8rOTv9alVK5dUtvOt+WqJx3sAFucLNd8JXEhYdidl3 QUiOvs4SG8IYblxMj5cydGT2Nx3FlUAeiW0LIv4ZreoPItqUiHoQ33oj1kY9ZkGSSYI/ oszjT2bo31xFYni2hhF4idEQxOhU5aTCZ5THuwu/jXd6tCVYytOt5GKqKUtvi3TpkmbP MfVZyGH+6DHImMA/KF7t3bh1EDxE8NhGvBark/dihFHwtZYkSeggiU01C7W2uSWYkXYt TJmg== 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=JnA8EvXdeEwN8pRQP0MpQ7Bwix3rW1cV6V4o1jd2WMY=; b=Z2s5+pXycTkrfCYCQWhKYFSbFglmeZ2rC0Bw9mYB1fa7mrmiEyu6IrHOMnb5q5rmxD GzXIVtSaLcMurm9aZQHRcJGp2CGEHrCQiK38gcDs1Gv2TN+vjBo/0lJXI8nzE5QSqmmx x2YMab5ttb6AYg6sClhQQ7uM7XkYlzzEvFM53nKbpt4c8XH1wUAzbzKfSAUHuewyj2D6 fW+8Wj1r2FZoAnFFzjLdeLXiQcCp4UmSf5OkUhRTY6zmAiBoum6sBLPMZSjLxBDVOkIL ILq277t6MOOiDX0FGB5CmQKEbmbxvsv1DLN0v8xNLJBFZvSPt19lwhh3jLyJcOFGlO8j Q3Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=BfHZJ0PL; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id co13-20020a0564020c0d00b0043565bae501si14807206edb.210.2022.07.18.13.06.53; Mon, 18 Jul 2022 13:07:24 -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=@quicinc.com header.s=qcdkim header.b=BfHZJ0PL; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236366AbiGRT5d (ORCPT + 99 others); Mon, 18 Jul 2022 15:57:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234580AbiGRT5N (ORCPT ); Mon, 18 Jul 2022 15:57:13 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 657FD2E9F0; Mon, 18 Jul 2022 12:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1658174232; x=1689710232; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=JnA8EvXdeEwN8pRQP0MpQ7Bwix3rW1cV6V4o1jd2WMY=; b=BfHZJ0PLsOssmCOiB6NoK44Hn/Ww8NGdc3ifMyWjgI7nr6VvSFWXr+bO 2W5DOWHvi/4nq6KcZUEWnD9d8S7J5bofPqdQWOkyrurNiQVtOafLjgai+ FSaL9JmSjfoWLqTWe5D7XghTLgkJb16JykCZrLAFhQARsk7iej4odl0c8 k=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-02.qualcomm.com with ESMTP; 18 Jul 2022 12:57:12 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 12:57:11 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 18 Jul 2022 12:57:10 -0700 Received: from [10.110.0.218] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 18 Jul 2022 12:57:10 -0700 Message-ID: Date: Mon, 18 Jul 2022 12:57:09 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v3 1/2] dt-bindings: power: reset: qcom-pon: update "reg" property details Content-Language: en-US To: Krzysztof Kozlowski , , , , , CC: , , , , , , , David Collins References: <20220713193350.29796-1-quic_amelende@quicinc.com> <20220713193350.29796-2-quic_amelende@quicinc.com> From: Anjelique Melendez In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 7/14/2022 4:48 AM, Krzysztof Kozlowski wrote: > On 13/07/2022 21:33, Anjelique Melendez wrote: >> From: David Collins >> >> Update the description of "reg" property to add the PON_PBS base >> address along with PON_HLOS base address. Also add "reg-names" >> property description. >> >> Signed-off-by: David Collins >> Signed-off-by: Anjelique Melendez >> --- >> Documentation/devicetree/bindings/power/reset/qcom,pon.yaml | 73 ++++++++++++++++++++++++++++-- >> 1 file changed, 69 insertions(+), 4 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml >> index 353f155d..562fe308 100644 >> --- a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml >> +++ b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml >> @@ -15,18 +15,26 @@ description: | >> >> This DT node has pwrkey and resin as sub nodes. >> >> -allOf: >> - - $ref: reboot-mode.yaml# >> - >> properties: >> compatible: >> enum: >> - qcom,pm8916-pon >> - qcom,pms405-pon >> - qcom,pm8998-pon >> + - qcom,pmk8350-pon >> >> reg: >> - maxItems: 1 >> + description: | >> + Specifies the SPMI base address for the PON (power-on) peripheral. For >> + PMICs that have the PON peripheral (GEN3) split into PON_HLOS and PON_PBS >> + (e.g. PMK8350), this can hold addresses of both PON_HLOS and PON_PBS >> + peripherals. In that case, the PON_PBS address needs to be specified to >> + facilitate software debouncing on some PMIC. > > You miss here min and maxItems ACK > >> + >> + reg-names: >> + description: | >> + For PON GEN1 and GEN2, it should be "pon". For PON GEN3 it should include >> + "hlos" and optionally "pbs". > > Skip description. You miss here min and maxItems. > > See > https://elixir.bootlin.com/linux/v5.19-rc6/source/Documentation/devicetree/bindings/clock/samsung,exynos7-clock.yaml#L57 > for examples. ACK > > >> >> pwrkey: >> type: object >> @@ -42,6 +50,63 @@ required: >> >> unevaluatedProperties: false >> >> +allOf: >> + - $ref: reboot-mode.yaml# >> + - if: >> + properties: >> + compatible: >> + contains: >> + const: qcom,pm8916-pon >> + then: >> + properties: >> + reg: >> + maxItems: 1 >> + reg-names: >> + items: >> + - const: pon >> + >> + - if: >> + properties: >> + compatible: >> + contains: >> + const: qcom,pms405-pon >> + then: >> + properties: >> + reg: >> + maxItems: 1 >> + reg-names: >> + items: >> + - const: pon >> + >> + - if: >> + properties: >> + compatible: >> + contains: >> + const: qcom,pm8998-pon >> + then: >> + properties: >> + reg: >> + maxItems: 1 >> + reg-names: >> + items: >> + - const: pon > > No clue why you made three if statements. This is one if for all three > variants. > Sorry about that was not sure how to combine the if statements originally. Found that you could do: - if: properties: compatible: contains: enum: - qcom,pm8916-pon - qcom,pms405-pon - qcom,pm8998-pon then: ... I was wondering if for the "qcom,pmk8350-pon" compatible would you rather have the if statement the way it is or have it follow the same pattern as above i.e. contains: const: qcom,pmk8350-pon vs contains: enum: - qcom,pmk8350-pon >> + >> + - if: >> + properties: >> + compatible: >> + contains: >> + const: qcom,pmk8350-pon >> + then: >> + properties: >> + reg: >> + minItems: 1 >> + maxItems: 2 >> + reg-names: >> + minItems: 1 >> + items: >> + - const: hlos >> + - const: pbs >> + >> examples: >> - | >> #include > > > Best regards, > Krzysztof Thanks, Anjelique