From patchwork Mon Mar 22 04:47:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 12153691 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 561DCC433C1 for ; Mon, 22 Mar 2021 04:49:44 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E6B7261930 for ; Mon, 22 Mar 2021 04:49:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E6B7261930 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=sgxjnQUayM8Rm9dQ08RGM5V5te/uftzmeGNF1Q+2MS0=; b=h3wJtVNbqdNtNUCtn+OFVnCgV mLdkaL1I5QYtHEGwZD+xMvy5X+M86oRwB9lFsa4x0I6m6FOp1bzi9bjMcsgiF9eUp4h+WRMp7hJVX MNcOgQvrZcAB46OQZp1hpfB7q6IvKHeaLO/Zrpj7N8jmQ7uY9kidkDVG7yKXhR6zZKyxC+pqNLEM/ LDjquzCJ9tzFSKaX+t3ZPDkR13JBn9qUtp4ZP+6+JBZjf298t2JTmqzCiKTVFe/PSjgoFx3o7jmZ6 Reh4Ii9OzJAGnunTa1OrM6S7Fh34632K0/RZ9a7iVV8FUt9pjIdpvSOsAQstE+I0M2gaFvj4uPZFo WfWO8svdQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lOCTx-00As9d-5F; Mon, 22 Mar 2021 04:48:01 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lOCTF-00As18-E7 for linux-arm-kernel@lists.infradead.org; Mon, 22 Mar 2021 04:47:26 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 0E4D1581B0C; Mon, 22 Mar 2021 00:47:11 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 22 Mar 2021 00:47:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=kn90WelRryWGO vGeYwBhPQaYl+homL8f2WWhOA4xjB4=; b=TznZjqsBcm/AXUmrIs16RFjt4+w5z 7F5ita+tFD6T1gYA0IycFQVEfVt+px/OEAVYvmg83wX5c3C5nD86zbDzosn/XyBD xoaweNsMAg3Czqpp7hlWHa10QqQeXVqhpjYNWiXbwVv2egTopSXzOtzjg+tLLhLs fO3TsyfMl5SjrUA7aTBGQVcqduLrTVQo7vu6iJSd7wAMj7o6uL2hbGXy5/PY/MNY 6uhS18UeO3rwUkO4SbbMS+T4pRmv0mMGilzDoUV7Zf6/2UusMae66I1bEgVLu3RL SgTOoqKHv6DbKkKsklfwb7iXPHOneiwm8Fc8Jp2FBPULxcuuDjeNiwLrw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=kn90WelRryWGOvGeYwBhPQaYl+homL8f2WWhOA4xjB4=; b=LvauHsbo Zqh9roAzx9+3aNODpDu8QLi0qhIi995AFslpBcqFYIDyy4Ogc4PBRCYAfllGdVL8 VLqqmaw6pKPNTRN1341vB5PCQuuw/2sOwP6Rh464m1zHp/V1gILpWBRUJqpVV9ob pWf3GQxGMO/qzL5TDyum4rnGmm6MqtbpGALnWxcurtYKdjXZghXQPzY6+895CQ7O F/L1u6SzqwOLbr8K9ZDFJQsMkwEJo8TNDJ0N2ZlqHG/oSFgqVhtoGk0EQi0VUMm6 o37ys4IUaw4O68OLxwKN5L0eVmFC1Im1Q4Es6u7XrNywO9/xZGL1+T+ltBUNyfzZ bX3a4nvlgb7D5Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudegfedgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucfkphepjedtrddufeehrddugeekrdduhedunecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhhuvghlsehshhholhhlrghn ugdrohhrgh X-ME-Proxy: Received: from titanium.stl.sholland.net (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA id 03D64108005F; Mon, 22 Mar 2021 00:47:08 -0400 (EDT) From: Samuel Holland To: Daniel Lezcano , Thomas Gleixner , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Catalin Marinas , Will Deacon Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Samuel Holland , Maxime Ripard Subject: [PATCH v2 1/5] dt-bindings: timer: Simplify conditional expressions Date: Sun, 21 Mar 2021 23:47:03 -0500 Message-Id: <20210322044707.19479-2-samuel@sholland.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210322044707.19479-1-samuel@sholland.org> References: <20210322044707.19479-1-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210322_044720_500754_8808E5C0 X-CRM114-Status: UNSURE ( 9.66 ) X-CRM114-Notice: Please train this message. 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 The sun4i timer IP block has a variable number of interrupts based on the compatible. Use enums to combine the two sections for the existing 3-interrupt variants, and to simplify adding new compatible strings. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Reviewed-by: Rob Herring --- .../timer/allwinner,sun4i-a10-timer.yaml | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml b/Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml index 1c7cf32e7ac2..3462598e609d 100644 --- a/Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml +++ b/Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml @@ -34,8 +34,8 @@ allOf: - if: properties: compatible: - items: - const: allwinner,sun4i-a10-timer + enum: + - allwinner,sun4i-a10-timer then: properties: @@ -46,8 +46,8 @@ allOf: - if: properties: compatible: - items: - const: allwinner,sun8i-a23-timer + enum: + - allwinner,sun8i-a23-timer then: properties: @@ -58,20 +58,9 @@ allOf: - if: properties: compatible: - items: - const: allwinner,sun8i-v3s-timer - - then: - properties: - interrupts: - minItems: 3 - maxItems: 3 - - - if: - properties: - compatible: - items: - const: allwinner,suniv-f1c100s-timer + enum: + - allwinner,sun8i-v3s-timer + - allwinner,suniv-f1c100s-timer then: properties: