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 67479C32774 for ; Thu, 25 Aug 2022 08:07:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239220AbiHYIHc (ORCPT ); Thu, 25 Aug 2022 04:07:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234467AbiHYIHa (ORCPT ); Thu, 25 Aug 2022 04:07:30 -0400 Received: from sender4-op-o14.zoho.com (sender4-op-o14.zoho.com [136.143.188.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 292298670B; Thu, 25 Aug 2022 01:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661414807; cv=none; d=zohomail.com; s=zohoarc; b=GPPQ95Ij6UbK9cbdbMjwj3IxV6MmdWMA267hSYszjyUDLDVIWmWLieL9hwf9Si9RpkNXNC7+7yRLuyyvgIqOf1JKVOmqfa2zc9OkZp4PSpCXnF0LU71pRb4ssN9DLyaFNI5TWPFnghHI95Yd0jJQeBkdRJ1UmWLTRvJIMxLJirk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661414807; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=4JsieqXDivmRRvE/zWwLdZw6fqOmBPCekC3LYmW4t64=; b=Q/oh6A4YvYlHfL0xTF1YvF8rL0otqnlGAn1E5jvc8DG6U0TrOvH0AGYaG5Ae+dPA9uAQmFGgS2BcQvzGN7BsxCaGyuYputrWdRDx5ULjIqub6IZ2YDuoFME34nuxK3Wy/99r5JDZ74ON9r0d4IKWlVU5CKAOo5u5mu3dFVTdSgE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=arinc9.com; spf=pass smtp.mailfrom=arinc.unal@arinc9.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1661414807; s=zmail; d=arinc9.com; i=arinc.unal@arinc9.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=4JsieqXDivmRRvE/zWwLdZw6fqOmBPCekC3LYmW4t64=; b=F/SWD+LHEElDMK1k3KlaBPED4fBlWutYwKB9PXDF8rgMuI4KbfmzsGA4chOkWLQt TV0IpYKp8DC1pZ5Acq7fzhEU5ragF51BJ3azjmeQGIzmgTDvBTnY2gs0ZCMYV5blpJo nyxrL/Y8Elkx/+CbWBgBJt+KzRXEszGUqrja4fro= Received: from [10.10.10.3] (37.120.152.236 [37.120.152.236]) by mx.zohomail.com with SMTPS id 1661414805043384.980663798763; Thu, 25 Aug 2022 01:06:45 -0700 (PDT) Message-ID: Date: Thu, 25 Aug 2022 11:06:37 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v4 4/6] dt-bindings: net: dsa: mediatek,mt7530: define port binding per switch Content-Language: en-US To: Krzysztof Kozlowski , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sean Wang , Landen Chao , DENG Qingfang , Frank Wunderlich , Luiz Angelo Daros de Luca , Sander Vanheule , =?UTF-8?Q?Ren=c3=a9_van_Dorst?= , Daniel Golle , erkin.bozoglu@xeront.com, Sergio Paracuellos Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220820080758.9829-1-arinc.unal@arinc9.com> <20220820080758.9829-5-arinc.unal@arinc9.com> <7248cbce-29b9-aad6-c970-8e150bc23df8@linaro.org> From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <7248cbce-29b9-aad6-c970-8e150bc23df8@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ZohoMailClient: External Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25.08.2022 09:33, Krzysztof Kozlowski wrote: > On 23/08/2022 15:29, Arınç ÜNAL wrote: >> >> >> On 23.08.2022 13:47, Krzysztof Kozlowski wrote: >>> On 20/08/2022 11:07, Arınç ÜNAL wrote: >>>> Define DSA port binding per switch model as each switch model requires >>>> different values for certain properties. >>>> >>>> Define reg property on $defs as it's the same for all switch models. >>>> >>>> Remove unnecessary lines as they are already included from the referred >>>> dsa.yaml. >>>> >>>> Signed-off-by: Arınç ÜNAL >>>> --- >>>> .../bindings/net/dsa/mediatek,mt7530.yaml | 56 +++++++++++-------- >>>> 1 file changed, 34 insertions(+), 22 deletions(-) >>>> >>>> diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml >>>> index 657e162a1c01..7c4374e16f96 100644 >>>> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml >>>> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml >>>> @@ -130,38 +130,47 @@ properties: >>>> ethsys. >>>> maxItems: 1 >>>> >>>> -patternProperties: >>>> - "^(ethernet-)?ports$": >>>> - type: object >>>> - >>>> - patternProperties: >>>> - "^(ethernet-)?port@[0-9]+$": >>>> - type: object >>>> - description: Ethernet switch ports >>> >>> Again, I don't understand why do you remove definitions of these nodes >>> from top-level properties. I explained what I expect in previous >>> discussion and I am confused to hear "this cannot be done". >> >> I agree it can be done, but the binding is done with less lines the >> current way. >> >> I would need to add more lines than just for creating the node structure >> since dsa.yaml is not referred. >> >> Then, I would have to create the node structure again for the dsa-port >> checks. > > I understand you can create binding more concise, but not necessarily > more readable. The easiest to grasp is to define all the nodes in > top-level and customize them in allOf:if:then. This was actually also > needed for earlier dtschema with additionalProperties:false. You keep > defining properties in allOf:if:then, even though they are all > applicable to all variants. That's unusual and even if it reduces the > lines does not make it easier to grasp. Understood. Will send v6 with respect to this. Arınç