From patchwork Fri Aug 11 17:57:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikunj Kela X-Patchwork-Id: 13351259 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 4542EEB64DD for ; Fri, 11 Aug 2023 17:58:16 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=p1fkd+viJboXv0ix85j4IoqcKFe25b1DazAcpMkjExE=; b=ctUFAhPl5rYixY LkdlV3LqyS7M2vV+W3kwGIoKJZfanW7179Bzgtp4HLUjYKn7453vaDvtmXBbVr60jK+E0wGT0uUsZ mJJsYSTDj4GSHbUNfVdHJwNMcgrDLB4SX6UXFwNZbLkTR4nqNQq6QNhA4JY32HoPNw4OrCxvzz+iI ryhcOLn7taccZm1gOhkur2tGmYiTLqm8Fa1DxJ/qgwZxGnmLHMnr5Pw5kH/PspiKTwc81n0I7Ua3y mv8v7jRamC039hxyeTq1xqpKcoFlPU1UuMzsTeuuWcLiMydrgTk/jWhw4xkxHxE26rSRCnOsGNTHK 0pQBLSON6blVaejxiyRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qUWOX-00BICT-1f; Fri, 11 Aug 2023 17:57:53 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qUWOP-00BI9c-34 for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 17:57:47 +0000 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37BE4v42027553; Fri, 11 Aug 2023 17:57:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=mi+xMMZfbqMADnJGJ0QFgmIXamVRysXxN19hN2cy6go=; b=C+GZ2uNK6LR9U3ACr8Gkmgm4k+9UyWYsmesAS31rreEIoNTHhmfT2bnABGopRKY9AFQg xqWKg5DK3UU9K5csmwm4FlX56F0dQ8rR9kivuk12ZxrXSqQ54G1w5xOFseKI49XrhUXE AXVXsTDA4gZcGw+tX1t/YxaitIszSP2iZ3o0OUK/8gUrVq5/ZQVBP++fDpc06x3ycdSr l4DdEyKXyc96aBsheQVCuDfasZaEwVAVx38G6kORmaGt6x7Ukjspa/eKF889A6Kx5KBz LD/5uyIKxyA4DnPM7mbAlBTIJhc/YpUSiWSRTCCsnOtzWzqvudBxHIKVYJ4zMI51ZKjE AA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3sd8yaaegm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Aug 2023 17:57:37 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 37BHvb8S027995 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Aug 2023 17:57:37 GMT Received: from car-linux11.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Fri, 11 Aug 2023 10:57:36 -0700 From: Nikunj Kela To: CC: , , , , , , , , , , , Nikunj Kela Subject: [PATCH v3 1/3] dt-bindings: arm: convert nested if-else construct to allOf Date: Fri, 11 Aug 2023 10:57:17 -0700 Message-ID: <20230811175719.28378-2-quic_nkela@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230811175719.28378-1-quic_nkela@quicinc.com> References: <20230718160833.36397-1-quic_nkela@quicinc.com> <20230811175719.28378-1-quic_nkela@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: yodBgaxF1Y0kuNgrjE_IDK11qetbAR-e X-Proofpoint-ORIG-GUID: yodBgaxF1Y0kuNgrjE_IDK11qetbAR-e X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-11_09,2023-08-10_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 spamscore=0 phishscore=0 mlxscore=0 priorityscore=1501 impostorscore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308110164 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_105745_995421_D3D51256 X-CRM114-Status: GOOD ( 14.28 ) 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 Nested if-else construct is not scalable therefore, convert it to allOf:if-else. Signed-off-by: Nikunj Kela Suggested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski --- .../bindings/firmware/arm,scmi.yaml | 55 +++++++++---------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml index b138f3d23df8..8d54ea768d38 100644 --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml @@ -284,35 +284,34 @@ $defs: required: - compatible -if: - properties: - compatible: - contains: - const: arm,scmi -then: - properties: - interrupts: false - interrupt-names: false - - required: - - mboxes - - shmem - -else: - if: - properties: - compatible: - contains: - enum: - - arm,scmi-smc - - arm,scmi-smc-param - then: - required: - - arm,smc-id - - shmem +allOf: + - if: + properties: + compatible: + contains: + const: arm,scmi + then: + properties: + interrupts: false + interrupt-names: false + + required: + - mboxes + - shmem + + - if: + properties: + compatible: + contains: + enum: + - arm,scmi-smc + - arm,scmi-smc-param + then: + required: + - arm,smc-id + - shmem - else: - if: + - if: properties: compatible: contains: