From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2627DC433F5 for ; Wed, 13 Apr 2022 06:04:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232802AbiDMGHN (ORCPT ); Wed, 13 Apr 2022 02:07:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231590AbiDMGHM (ORCPT ); Wed, 13 Apr 2022 02:07:12 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1DDA42BB36; Tue, 12 Apr 2022 23:04:53 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id CC1CA8061; Wed, 13 Apr 2022 06:02:17 +0000 (UTC) Date: Wed, 13 Apr 2022 09:04:51 +0300 From: Tony Lindgren To: Krzysztof Kozlowski Cc: Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, Daniel Lezcano , Keerthy , Nishanth Menon , Vignesh Raghavendra Subject: Re: [PATCH 1/2] dt-bindings: timer: Update TI timer to yaml Message-ID: References: <20220412131644.59195-1-tony@atomide.com> <20220412131644.59195-2-tony@atomide.com> <1c455b6e-0009-6f8b-15c8-2a352479c5f2@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1c455b6e-0009-6f8b-15c8-2a352479c5f2@linaro.org> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org * Krzysztof Kozlowski [220412 17:04]: > On 12/04/2022 15:16, Tony Lindgren wrote: > > +allOf: > > + - if: > > + properties: > > + compatible: > > + contains: > > + enum: > > + - ti,omap3430-timer > > + - ti,omap4430-timer > > + - ti,omap5430-timer > > + then: > > + properties: > > + reg: > > + oneOf: > > + - items: > > + - description: IO address > > + - items: > > + - description: CPU to L4 ABE IO address > > + - description: L3 to L4 ABE IO address > > + clocks: > > + oneOf: > > + - items: > > + - description: Functional clock > > + - items: > > + - description: Functional clock > > + - description: System clock > > I think this can be made simpler, without oneOf: > > clocks: > items: > - description: Functional clock > - description: System clock > minItems: 1 > > > and similar for clock-names. OK simpler sure sounds good to me considering the file path starts with "Documentation" :) > > + clock-names: > > + oneOf: > > + - items: > > + - const: fck > > + - items: > > + - const: fck > > + - const: timer_sys_ck > > + else: > > + properties: > > + reg: > > + items: > > + - description: IO address > > + clocks: > > + items: > > + - description: Functional clock > > + clock-names: > > + items: > > + - const: fck > > Hmmm, in your previous version I had impression that first clock is not > the same on every flavor. Now it looks the same, so clocks you could > simplify even more: > 1. Define full list in main properties (not in allOf) with minItems:1 > 2. Use maxItems:1, for this "else:" case. > > This could greatly reduce amount of code you need and keep the actual > definition of clocks in main properties (not in allOf; allOf are only to > constrain it). OK thanks I'll check. I think we can assume the first clock is "fck" if it is configured at all. Regards, Tony From mboxrd@z Thu Jan 1 00:00:00 1970 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 07A29C433F5 for ; Wed, 13 Apr 2022 06:06:06 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4m263d4PSe2S4gMYPF9jNmHj9XYvEZMoDnEvQoAzk/0=; b=I6gzm3t720Sql7 uDlhCer9PFz+iYxgigrWWoB0EfZbslV4C16hy4rfZL/cc0CthOyidj6lrnU4lhIyftEl9PC9MH0BL sdkJGHF0KNK7pz/ASDfjJuKTwJClENoAC+rVFcEoeWX/BlWWM6TnXxjx4brGoYpo7Y3YxKRqB8SlC L8FNs8eXipaqeyKwvrgVqj0ENj7ER7ankDzOPWYgzqgSgYqF2uJEpedbdj78V2HAEZJ6AfDmjrCda tIwNjUzaMBVaGq4obz9djuCY2qTAu1cUf1EbvJX7U0C1MnV1AaT/Tj/pjX1kipiB3jrLEED83o6x0 N8sIULK9ymMUkmnPCDXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1neW7d-00Gz7e-GB; Wed, 13 Apr 2022 06:04:57 +0000 Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1neW7Z-00Gz62-Cu for linux-arm-kernel@lists.infradead.org; Wed, 13 Apr 2022 06:04:54 +0000 Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id CC1CA8061; Wed, 13 Apr 2022 06:02:17 +0000 (UTC) Date: Wed, 13 Apr 2022 09:04:51 +0300 From: Tony Lindgren To: Krzysztof Kozlowski Cc: Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, Daniel Lezcano , Keerthy , Nishanth Menon , Vignesh Raghavendra Subject: Re: [PATCH 1/2] dt-bindings: timer: Update TI timer to yaml Message-ID: References: <20220412131644.59195-1-tony@atomide.com> <20220412131644.59195-2-tony@atomide.com> <1c455b6e-0009-6f8b-15c8-2a352479c5f2@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1c455b6e-0009-6f8b-15c8-2a352479c5f2@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220412_230453_514255_96AF7F45 X-CRM114-Status: GOOD ( 15.64 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org * Krzysztof Kozlowski [220412 17:04]: > On 12/04/2022 15:16, Tony Lindgren wrote: > > +allOf: > > + - if: > > + properties: > > + compatible: > > + contains: > > + enum: > > + - ti,omap3430-timer > > + - ti,omap4430-timer > > + - ti,omap5430-timer > > + then: > > + properties: > > + reg: > > + oneOf: > > + - items: > > + - description: IO address > > + - items: > > + - description: CPU to L4 ABE IO address > > + - description: L3 to L4 ABE IO address > > + clocks: > > + oneOf: > > + - items: > > + - description: Functional clock > > + - items: > > + - description: Functional clock > > + - description: System clock > > I think this can be made simpler, without oneOf: > > clocks: > items: > - description: Functional clock > - description: System clock > minItems: 1 > > > and similar for clock-names. OK simpler sure sounds good to me considering the file path starts with "Documentation" :) > > + clock-names: > > + oneOf: > > + - items: > > + - const: fck > > + - items: > > + - const: fck > > + - const: timer_sys_ck > > + else: > > + properties: > > + reg: > > + items: > > + - description: IO address > > + clocks: > > + items: > > + - description: Functional clock > > + clock-names: > > + items: > > + - const: fck > > Hmmm, in your previous version I had impression that first clock is not > the same on every flavor. Now it looks the same, so clocks you could > simplify even more: > 1. Define full list in main properties (not in allOf) with minItems:1 > 2. Use maxItems:1, for this "else:" case. > > This could greatly reduce amount of code you need and keep the actual > definition of clocks in main properties (not in allOf; allOf are only to > constrain it). OK thanks I'll check. I think we can assume the first clock is "fck" if it is configured at all. Regards, Tony _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel