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 6E0C2C433EF for ; Mon, 4 Jul 2022 09:08:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233646AbiGDJIu (ORCPT ); Mon, 4 Jul 2022 05:08:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233621AbiGDJIk (ORCPT ); Mon, 4 Jul 2022 05:08:40 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B64E3298 for ; Mon, 4 Jul 2022 02:08:38 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id i18so14654650lfu.8 for ; Mon, 04 Jul 2022 02:08:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=oGNDCl3xbz89yHsXLL6sBYHqZXI1K+BhWsAL0ZkEsFc=; b=TupbwQza+6J6iVerLVWmqv8E3wm0w8p/FrXy3tIb8knjaqECQNOPplV4tLxQSlo9hR AHFDcBiLOQs7Od1rSazaVaF0y2I0HZpY+qZfttcF4+tXTaINAvCUVNfv9AOitgsD/0U6 5+Iqt5eX1bpygi5Wl7RcRgTiQcsX4mOyNar0lOwEfX6vW89WZZfiBCQDWrPKxuVNvsvK z1Ha2V0xuJRuQdkmVLNDZOKyAO8YxXFQ0sGAUa8CWqps0xTh+XQ/og8JElMK42VG/4eD ro9CHuFL0dutYc2o2VJPiQTGqDQRBU8Bf19vd8BVebJe5egyXwCSSdWri8zsI+DFSeSd PCug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=oGNDCl3xbz89yHsXLL6sBYHqZXI1K+BhWsAL0ZkEsFc=; b=Qb9MTxwYV3vOiw5pWW1waKLtippbrEwpiPYpeQNqpyD2wh+dNAsdkvVlGS3b2vDxtQ kAotaNcTmEMWkFQsKVpaecqSTYPUcDLLQ5aIe1nBYDhy7Ksuov69BRLSj54w7jlQW+cF ANpIdwLhsl4xCPCnkXXF7if7xKi55QBw7UYU3nvrPxpYF8Z+KFnXKypeFNE32r5MsMmo VS2vkKPl61t5t9cyzaCI7/6QG/GyJH0Q0O+Y7cVAk346Wb4asoWeIO5/kqd2LLkxADKu JBKK6t3EUGMGOnAv7m3DRU7+Vl8mDm5AxvCgPe3jwUT1zQ+5ZJ/AofxHuXiTt+PhiLCF ISfA== X-Gm-Message-State: AJIora+Z7dO99vL3sJAuaEsIkPn+/faWNfPR9UAcY1nAPAoU+OO//i45 ZB00qJIIxJ0aMaYo4TMMQqV0lQ== X-Google-Smtp-Source: AGRyM1tdqvHET1AdQnkMAFZqNA8EbWbSwsyPfxDvNoMg5dC9JD2C0sq7gBZUQPSOybW9JConCzkEBw== X-Received: by 2002:a05:6512:3d86:b0:47f:9adc:cc27 with SMTP id k6-20020a0565123d8600b0047f9adccc27mr17770690lfv.608.1656925716970; Mon, 04 Jul 2022 02:08:36 -0700 (PDT) Received: from [192.168.1.52] ([84.20.121.239]) by smtp.gmail.com with ESMTPSA id v8-20020ac258e8000000b0047f6d20e424sm5032577lfo.55.2022.07.04.02.08.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Jul 2022 02:08:36 -0700 (PDT) Message-ID: <404a0146-5e74-b0df-6e1a-c6a689e2c858@linaro.org> Date: Mon, 4 Jul 2022 11:08:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v3 1/6] dt-bindings: can: sja1000: Convert to json-schema Content-Language: en-US To: Biju Das , Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski Cc: "linux-can@vger.kernel.org" , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , Geert Uytterhoeven , Chris Paterson , Biju Das , "linux-renesas-soc@vger.kernel.org" References: <20220704075032.383700-1-biju.das.jz@bp.renesas.com> <20220704075032.383700-2-biju.das.jz@bp.renesas.com> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 04/07/2022 11:03, Biju Das wrote: > Hi Krystof, > > Thanks for the feedback. > >> Subject: Re: [PATCH v3 1/6] dt-bindings: can: sja1000: Convert to json- >> schema >> >> On 04/07/2022 09:50, Biju Das wrote: >>> Convert the NXP SJA1000 CAN Controller Device Tree binding >>> documentation to json-schema. >>> >>> Update the example to match reality. >>> >>> Signed-off-by: Biju Das >>> --- >>> v2->v3: >>> * Added reg-io-width is a required property for technologic,sja1000 >>> * Removed enum type from nxp,tx-output-config and updated the >> description >>> for combination of TX0 and TX1. >>> * Updated the example >>> v1->v2: >>> * Moved $ref: can-controller.yaml# to top along with if conditional >>> to >>>    avoid multiple mapping issues with the if conditional in the >> subsequent >>> patch. >>> --- >>> .../bindings/net/can/nxp,sja1000.yaml | 103 ++++++++++++++++++ >>> .../devicetree/bindings/net/can/sja1000.txt | 58 ---------- >>> 2 files changed, 103 insertions(+), 58 deletions(-) create mode >>> 100644 Documentation/devicetree/bindings/net/can/nxp,sja1000.yaml >>> delete mode 100644 >>> Documentation/devicetree/bindings/net/can/sja1000.txt >>> >>> diff --git >>> a/Documentation/devicetree/bindings/net/can/nxp,sja1000.yaml >>> b/Documentation/devicetree/bindings/net/can/nxp,sja1000.yaml >>> new file mode 100644 >>> index 000000000000..d34060226e4e >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/net/can/nxp,sja1000.yaml >>> @@ -0,0 +1,103 @@ >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 >>> +--- >>> +$id: >>> + >>> +title: Memory mapped SJA1000 CAN controller from NXP (formerly >>> +Philips) >>> + >>> +maintainers: >>> + - Wolfgang Grandegger >>> + >>> +allOf: >>> + - $ref: can-controller.yaml# >>> + - if: >> >> The advice of moving it up was not correct. The allOf containing ref and >> if:then goes to place like in example-schema, so before >> additional/unevaluatedProperties at the bottom. >> >> Please do not introduce some inconsistent style. > > There are some examples like[1], where allOf is at the top. > [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml?h=next-20220704 And they are wrong. There is always some incorrect code in the kernel, but that's not argument to do it in incorrect way. The coding style is here expressed in example-schema, so use this as an argument. > > Marc, please let us know, if you still prefer allOf at the top. > >> Best regards, Krzysztof