Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1161992pxf; Fri, 9 Apr 2021 01:20:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEUIXMFBcFqh5MLe+fIMtJK1oBzdIqK87Xr4z/J22fPL/wu8nC+vuw2pKImqyJGYcI2ZHZ X-Received: by 2002:a17:906:8317:: with SMTP id j23mr6844241ejx.13.1617956416964; Fri, 09 Apr 2021 01:20:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617956416; cv=none; d=google.com; s=arc-20160816; b=YQFQVZLo0MTQTSybwdG+aOOQs+qV9t4wsTm3E1w8QciMaMINvHI6Owim+z7inNR1aJ DRbj4frzw0AdwntkjtMFFIJieYvNIKo1Bbg79m8ab1nN7yeOpu+gX/OsW00qupCh1LZB WaohWB9BLhlQ3Z2fM91+m/Nh+xrcOJlRvDhHepsorV6ZtqA6BVScjB6rCf45YE8J8ItK +ZsPD6t55ZNR0lziCzkOnT9IsXRbFibmSBk9sD1gDOgjLJsY2wj7S0/CpbA3bcqL5VDh G94wjWsu9a3UixjqTRB5/W2GzPII7ZV/Iw+bgEFJNhEc8QNWEx559DusopxRPQoKieg+ 62cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=UM9uhxnzJhVi5iLX05PsBl0YNEH1zzB5iVkmTJT1W5c=; b=PhFOaNCruukm4Wn1p1bcjIFdte6JslJM15z6F10T8xnomflKpyhn8OrMRocx5scP3v 6FKGSoL1MnP3+rNoGow3SdcJUBMzDENeHnCpDJOQHTwFquy+kbk5Wl2ccQPuCK4r46Ty LKLe3sRY3YAF2h/UPBvTx2BoK7oNDjnG3g1kdK74X/F8aNs0pfyhAhcZrdhTssYqmV8c odrZ9EO5h26bmGMMikql69Vw1dO4Il8UxhwfWbnZr2FVnVikwiyc//ukKAvhABULmiTq 3BP3wuYBP+HsbOHdxQOvUWeEQEtfUnYfzigYDZwq6RCVOAedBpc6Eb2Kme2ChN/mFEgk 108Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=Wjt8iWZj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bn9si1558729ejb.23.2021.04.09.01.19.53; Fri, 09 Apr 2021 01:20:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=Wjt8iWZj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229846AbhDIITR (ORCPT + 99 others); Fri, 9 Apr 2021 04:19:17 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:33306 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230181AbhDIITQ (ORCPT ); Fri, 9 Apr 2021 04:19:16 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1617956344; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=UM9uhxnzJhVi5iLX05PsBl0YNEH1zzB5iVkmTJT1W5c=; b=Wjt8iWZj+6LciZxjUABvpPnTarzfCAoT0w+YLH6QIwY8gDN88TQ0H2WY6A2rvIRvNOkGM3t6 /5+TEwsMYHGRHxBVMXjhLid/scW1hizkWlwq2SRcTviRojlOFBSy0pKV0rZ9/RMQBpTwQBo+ KrCx734QMx2HM67MsgCVR8jy2/Y= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-west-2.postgun.com with SMTP id 60700df38807bcde1df43cb6 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 09 Apr 2021 08:18:59 GMT Sender: skakit=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id CF88CC43463; Fri, 9 Apr 2021 08:18:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: skakit) by smtp.codeaurora.org (Postfix) with ESMTPSA id 81100C433CA; Fri, 9 Apr 2021 08:18:58 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 09 Apr 2021 13:48:58 +0530 From: skakit@codeaurora.org To: Sebastian Reichel Cc: Dmitry Torokhov , Rob Herring , Andy Gross , Bjorn Andersson , David Collins , kgunda@codeaurora.org, Vinod Koul , Courtney Cavin , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH V2 3/4] dt-bindings: power: reset: qcom-pon: Convert qcom PON binding to yaml In-Reply-To: <20210408130001.k3qbq3vvwkiyykzv@earth.universe> References: <1617881469-31965-1-git-send-email-skakit@codeaurora.org> <1617881469-31965-4-git-send-email-skakit@codeaurora.org> <20210408130001.k3qbq3vvwkiyykzv@earth.universe> Message-ID: <0cb9b3503000ac7206f4a3ef5fd16c17@codeaurora.org> X-Sender: skakit@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sebastian, On 2021-04-08 18:30, Sebastian Reichel wrote: > Hi, > > On Thu, Apr 08, 2021 at 05:01:08PM +0530, satya priya wrote: >> Convert qcom PON binding from .txt to .yaml format. >> >> Signed-off-by: satya priya >> --- > > Thanks for doing this. > >> Changes in V2: >> - As per Rob's comments, converted the main PON binding and added in >> V2. >> >> .../devicetree/bindings/power/reset/qcom,pon.txt | 49 >> ---------------------- >> .../devicetree/bindings/power/reset/qcom,pon.yaml | 41 >> ++++++++++++++++++ >> 2 files changed, 41 insertions(+), 49 deletions(-) >> delete mode 100644 >> Documentation/devicetree/bindings/power/reset/qcom,pon.txt >> create mode 100644 >> Documentation/devicetree/bindings/power/reset/qcom,pon.yaml >> >> diff --git >> a/Documentation/devicetree/bindings/power/reset/qcom,pon.txt >> b/Documentation/devicetree/bindings/power/reset/qcom,pon.txt >> deleted file mode 100644 >> index 0c0dc3a..0000000 >> --- a/Documentation/devicetree/bindings/power/reset/qcom,pon.txt >> +++ /dev/null >> @@ -1,49 +0,0 @@ >> -Qualcomm PON Device >> - >> -The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey >> -and resin along with the Android reboot-mode. >> - >> -This DT node has pwrkey and resin as sub nodes. >> - >> -Required Properties: >> --compatible: Must be one of: >> - "qcom,pm8916-pon" >> - "qcom,pms405-pon" >> - "qcom,pm8998-pon" >> - >> --reg: Specifies the physical address of the pon register >> - >> -Optional subnode: >> --pwrkey: Specifies the subnode pwrkey and should follow the >> - qcom,pm8941-pwrkey.txt description. >> --resin: Specifies the subnode resin and should follow the >> - qcom,pm8xxx-pwrkey.txt description. >> - >> -The rest of the properties should follow the generic reboot-mode >> description >> -found in reboot-mode.txt >> - >> -Example: >> - >> - pon@800 { >> - compatible = "qcom,pm8916-pon"; >> - >> - reg = <0x800>; >> - mode-bootloader = <0x2>; >> - mode-recovery = <0x1>; >> - >> - pwrkey { >> - compatible = "qcom,pm8941-pwrkey"; >> - interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; >> - debounce = <15625>; >> - bias-pull-up; >> - linux,code = ; >> - }; >> - >> - resin { >> - compatible = "qcom,pm8941-resin"; >> - interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; >> - debounce = <15625>; >> - bias-pull-up; >> - linux,code = ; >> - }; >> - }; >> diff --git >> a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml >> b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml >> new file mode 100644 >> index 0000000..40eea5f1 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml >> @@ -0,0 +1,41 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/power/reset/qcom,pon.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Qualcomm PON Device >> + >> +maintainers: >> + - Vinod Koul >> + >> +description: | >> + The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey >> + and resin along with the Android reboot-mode. >> + >> + This DT node has pwrkey and resin as sub nodes. >> + >> +properties: >> + compatible: >> + enum: >> + - qcom,pm8916-pon >> + - qcom,pms405-pon >> + - qcom,pm8998-pon >> + >> + reg: >> + description: Specifies the physical address of the pon register > > That description is obvious and pointless. Instead add > > maxItems: 1 > Okay. >> + pwrkey: >> + type: object >> + $ref: "../../input/qcom,pm8941-pwrkey.yaml#" >> + >> + resin: >> + type: object >> + $ref: "../../input/qcom,pm8941-pwrkey.yaml#" >> + >> +required: >> + - compatible >> + - reg >> + >> +additionalProperties: true > > Instead of allowing arbitrary properties, only valid modes > should be allowed. So drop additionalProperties and do this > instead: > > allOf: > - $ref: reboot-mode.yaml# > > unevaluatedProperties: false > Okay. >> +... > > Please do not drop the example :) > As per my understanding on Rob's comments [1] I have added one complete example in qcom,pm8941-pwrkey.yaml (see patch 4/4) and dropped it here. [1] https://lore.kernel.org/patchwork/patch/1390062/#1588027 > -- Sebastian Thanks, Satya Priya