* Re: [PATCH v4] docs: dt-bindings: add DTS Coding Style document
2023-12-03 17:46 [PATCH v4] docs: dt-bindings: add DTS Coding Style document Krzysztof Kozlowski
@ 2023-12-03 18:40 ` Francesco Dolcini
2023-12-03 20:25 ` Dragan Simic
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Francesco Dolcini @ 2023-12-03 18:40 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Andrew Davis, Andrew Lunn,
Arnd Bergmann, Bjorn Andersson, Chen-Yu Tsai, Dmitry Baryshkov,
Jonathan Corbet, Michal Simek, Neil Armstrong, Nishanth Menon,
Olof Johansson, Rafał Miłecki, Heiko Stuebner,
Laurent Pinchart, Konrad Dybcio, Geert Uytterhoeven,
linux-rockchip, linux-samsung-soc, linux-amlogic, linux-arm-msm,
workflows, linux-doc
Hello Krzysztof,
On Sun, Dec 03, 2023 at 06:46:22PM +0100, Krzysztof Kozlowski wrote:
> Document preferred coding style for Devicetree sources (DTS and DTSI),
> to bring consistency among all (sub)architectures and ease in reviews.
>
> Cc: Andrew Davis <afd@ti.com>
> cc: Andrew Lunn <andrew@lunn.ch>
> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Bjorn Andersson <andersson@kernel.org>
> Cc: Chen-Yu Tsai <wens@kernel.org>
> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Michal Simek <michal.simek@amd.com>
> Cc: Neil Armstrong <neil.armstrong@linaro.org>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Olof Johansson <olof@lixom.net>
> Cc: Rafał Miłecki <zajec5@gmail.com>
> Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
> Acked-by: Heiko Stuebner <heiko@sntech.de>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Acked-by: Konrad Dybcio <konradybcio@kernel.org>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Francesco
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4] docs: dt-bindings: add DTS Coding Style document
2023-12-03 17:46 [PATCH v4] docs: dt-bindings: add DTS Coding Style document Krzysztof Kozlowski
2023-12-03 18:40 ` Francesco Dolcini
@ 2023-12-03 20:25 ` Dragan Simic
2023-12-04 15:15 ` Krzysztof Kozlowski
2023-12-04 12:13 ` AngeloGioacchino Del Regno
` (3 subsequent siblings)
5 siblings, 1 reply; 8+ messages in thread
From: Dragan Simic @ 2023-12-03 20:25 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Andrew Davis, Andrew Lunn,
Arnd Bergmann, Bjorn Andersson, Chen-Yu Tsai, Dmitry Baryshkov,
Jonathan Corbet, Michal Simek, Neil Armstrong, Nishanth Menon,
Olof Johansson, Rafał Miłecki, Heiko Stuebner,
Laurent Pinchart, Konrad Dybcio, Geert Uytterhoeven,
linux-rockchip, linux-samsung-soc, linux-amlogic, linux-arm-msm,
workflows, linux-doc
> +Order of Properties in Device Node
> +----------------------------------
> +
> +The following order of properties in device nodes is preferred:
> +
> +1. compatible
> +2. reg
> +3. ranges
> +4. Standard/common properties (defined by common bindings, e.g.
> without
> + vendor-prefixes)
> +5. Vendor-specific properties
> +6. status (if applicable)
> +7. Child nodes, where each node is preceded with a blank line
Another small suggestion... It would be good to put the property names
found in the list items, such as "compatible" and "status", into
quotation marks, to make it obvious what they are. That way, the list
would also be more consistent with the property names mentioned in the
sentence right below.
> +
> +The "status" property is by default "okay", thus it can be omitted.
> +
> +The above-described ordering follows this approach:
> +
> +1. Most important properties start the node: compatible then bus
> addressing to
> + match unit address.
> +2. Each node will have common properties in similar place.
> +3. Status is the last information to annotate that device node is or
> is not
> + finished (board resources are needed).
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4] docs: dt-bindings: add DTS Coding Style document
2023-12-03 20:25 ` Dragan Simic
@ 2023-12-04 15:15 ` Krzysztof Kozlowski
0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-04 15:15 UTC (permalink / raw)
To: Dragan Simic
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Andrew Davis, Andrew Lunn,
Arnd Bergmann, Bjorn Andersson, Chen-Yu Tsai, Dmitry Baryshkov,
Jonathan Corbet, Michal Simek, Neil Armstrong, Nishanth Menon,
Olof Johansson, Rafał Miłecki, Heiko Stuebner,
Laurent Pinchart, Konrad Dybcio, Geert Uytterhoeven,
linux-rockchip, linux-samsung-soc, linux-amlogic, linux-arm-msm,
workflows, linux-doc
On 03/12/2023 21:25, Dragan Simic wrote:
>> +Order of Properties in Device Node
>> +----------------------------------
>> +
>> +The following order of properties in device nodes is preferred:
>> +
>> +1. compatible
>> +2. reg
>> +3. ranges
>> +4. Standard/common properties (defined by common bindings, e.g.
>> without
>> + vendor-prefixes)
>> +5. Vendor-specific properties
>> +6. status (if applicable)
>> +7. Child nodes, where each node is preceded with a blank line
>
> Another small suggestion... It would be good to put the property names
> found in the list items, such as "compatible" and "status", into
> quotation marks, to make it obvious what they are. That way, the list
> would also be more consistent with the property names mentioned in the
> sentence right below.
If there is going to be new version, I'll implement it. Otherwise it is
pickiness over style, not content essence.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4] docs: dt-bindings: add DTS Coding Style document
2023-12-03 17:46 [PATCH v4] docs: dt-bindings: add DTS Coding Style document Krzysztof Kozlowski
2023-12-03 18:40 ` Francesco Dolcini
2023-12-03 20:25 ` Dragan Simic
@ 2023-12-04 12:13 ` AngeloGioacchino Del Regno
2023-12-04 17:33 ` Conor Dooley
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-12-04 12:13 UTC (permalink / raw)
To: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: Andrew Davis, Andrew Lunn, Arnd Bergmann, Bjorn Andersson,
Chen-Yu Tsai, Dmitry Baryshkov, Jonathan Corbet, Michal Simek,
Neil Armstrong, Nishanth Menon, Olof Johansson,
Rafał Miłecki, Heiko Stuebner, Laurent Pinchart,
Konrad Dybcio, Geert Uytterhoeven, linux-rockchip,
linux-samsung-soc, linux-amlogic, linux-arm-msm, workflows,
linux-doc
Il 03/12/23 18:46, Krzysztof Kozlowski ha scritto:
> Document preferred coding style for Devicetree sources (DTS and DTSI),
> to bring consistency among all (sub)architectures and ease in reviews.
>
> Cc: Andrew Davis <afd@ti.com>
> cc: Andrew Lunn <andrew@lunn.ch>
> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Bjorn Andersson <andersson@kernel.org>
> Cc: Chen-Yu Tsai <wens@kernel.org>
> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Michal Simek <michal.simek@amd.com>
> Cc: Neil Armstrong <neil.armstrong@linaro.org>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Olof Johansson <olof@lixom.net>
> Cc: Rafał Miłecki <zajec5@gmail.com>
> Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
> Acked-by: Heiko Stuebner <heiko@sntech.de>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Acked-by: Konrad Dybcio <konradybcio@kernel.org>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Thumbs up!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4] docs: dt-bindings: add DTS Coding Style document
2023-12-03 17:46 [PATCH v4] docs: dt-bindings: add DTS Coding Style document Krzysztof Kozlowski
` (2 preceding siblings ...)
2023-12-04 12:13 ` AngeloGioacchino Del Regno
@ 2023-12-04 17:33 ` Conor Dooley
2023-12-07 17:58 ` Rob Herring
2023-12-08 4:49 ` Florian Fainelli
5 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2023-12-04 17:33 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Andrew Davis, Andrew Lunn,
Arnd Bergmann, Bjorn Andersson, Chen-Yu Tsai, Dmitry Baryshkov,
Jonathan Corbet, Michal Simek, Neil Armstrong, Nishanth Menon,
Olof Johansson, Rafał Miłecki, Heiko Stuebner,
Laurent Pinchart, Konrad Dybcio, Geert Uytterhoeven,
linux-rockchip, linux-samsung-soc, linux-amlogic, linux-arm-msm,
workflows, linux-doc
[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]
On Sun, Dec 03, 2023 at 06:46:22PM +0100, Krzysztof Kozlowski wrote:
> Document preferred coding style for Devicetree sources (DTS and DTSI),
> to bring consistency among all (sub)architectures and ease in reviews.
>
> Cc: Andrew Davis <afd@ti.com>
> cc: Andrew Lunn <andrew@lunn.ch>
> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Bjorn Andersson <andersson@kernel.org>
> Cc: Chen-Yu Tsai <wens@kernel.org>
> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Michal Simek <michal.simek@amd.com>
> Cc: Neil Armstrong <neil.armstrong@linaro.org>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Olof Johansson <olof@lixom.net>
> Cc: Rafał Miłecki <zajec5@gmail.com>
> Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
> Acked-by: Heiko Stuebner <heiko@sntech.de>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Acked-by: Konrad Dybcio <konradybcio@kernel.org>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
The advice here seems pretty reasonable, and it is nice to have
something written. Thanks for working on it.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Cheers,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4] docs: dt-bindings: add DTS Coding Style document
2023-12-03 17:46 [PATCH v4] docs: dt-bindings: add DTS Coding Style document Krzysztof Kozlowski
` (3 preceding siblings ...)
2023-12-04 17:33 ` Conor Dooley
@ 2023-12-07 17:58 ` Rob Herring
2023-12-08 4:49 ` Florian Fainelli
5 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2023-12-07 17:58 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Nishanth Menon, linux-mediatek, Dmitry Baryshkov, Arnd Bergmann,
Olof Johansson, linux-arm-msm, linux-doc, Andrew Davis,
Andrew Lunn, linux-rockchip, Michal Simek, Neil Armstrong,
Jonathan Corbet, Konrad Dybcio, Chen-Yu Tsai, Krzysztof Kozlowski,
linux-amlogic, Bjorn Andersson, Rafał Miłecki,
linux-kernel, Geert Uytterhoeven, workflows, Rob Herring,
Laurent Pinchart, Matthias Brugger, devicetree, Heiko Stuebner,
AngeloGioacchino Del Regno, Conor Dooley, linux-arm-kernel,
linux-samsung-soc
On Sun, 03 Dec 2023 18:46:22 +0100, Krzysztof Kozlowski wrote:
> Document preferred coding style for Devicetree sources (DTS and DTSI),
> to bring consistency among all (sub)architectures and ease in reviews.
>
> Cc: Andrew Davis <afd@ti.com>
> cc: Andrew Lunn <andrew@lunn.ch>
> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Bjorn Andersson <andersson@kernel.org>
> Cc: Chen-Yu Tsai <wens@kernel.org>
> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Michal Simek <michal.simek@amd.com>
> Cc: Neil Armstrong <neil.armstrong@linaro.org>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Olof Johansson <olof@lixom.net>
> Cc: Rafał Miłecki <zajec5@gmail.com>
> Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
> Acked-by: Heiko Stuebner <heiko@sntech.de>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Acked-by: Konrad Dybcio <konradybcio@kernel.org>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Merging idea: Rob/DT bindings
>
> Changes in v4
> =============
> 1. Drop label at the top (Jon)
> 2. Grammar fixes (Laurent, Dragan)
> 3. "Unless a bus defines differently, unit addresses shall ..." (Rob)
> 4. Use hex in example of dma-controller (Andrew)
> 5. Example: soc@ -> soc@0
> 6. Reverse points 2 and 3 in "Indentation" (Andrew)
> 7. Use full path to coding style doc (Conor)
>
> Changes in v3
> =============
> 1. should->shall (Angelo)
> 2. Comments // -> /* (Angelo, Michal)
> 3. Use imaginary example in "Order of Properties in Device Node"
> (Angelo)
> 4. Added paragraphs for three sections with justifications of chosen
> style.
> 5. Allow two style of ordering overrides in board DTS: alphabetically or
> by order of DTSI (Rob).
> 6. I did not incorporate feedback about, due to lack of consensus and my
> disagreement:
> a. SoM being DTS without DTSI in "Organizing DTSI and DTS"
>
> Changes in v2
> =============
> 1. Hopefully incorporate entire feedback from comments:
> a. Fix \ { => / { (Rob)
> b. Name: dts-coding-style (Rob)
> c. Exceptions for ordering nodes by name for Renesas and pinctrl (Geert,
> Konrad)
> d. Ordering properties by common/vendor (Rob)
> e. Array entries in <> (Rob)
>
> 2. New chapter: Organizing DTSI and DTS
>
> 3. Several grammar fixes (missing articles)
>
> Cc: linux-rockchip@lists.infradead.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-amlogic@lists.infradead.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-arm-msm@vger.kernel.org
> Cc: workflows@vger.kernel.org
> Cc: linux-doc@vger.kernel.org
> ---
> .../devicetree/bindings/dts-coding-style.rst | 196 ++++++++++++++++++
> Documentation/devicetree/bindings/index.rst | 1 +
> 2 files changed, 197 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/dts-coding-style.rst
>
I added the quotes as discussed and applied, thanks!
Rob
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4] docs: dt-bindings: add DTS Coding Style document
2023-12-03 17:46 [PATCH v4] docs: dt-bindings: add DTS Coding Style document Krzysztof Kozlowski
` (4 preceding siblings ...)
2023-12-07 17:58 ` Rob Herring
@ 2023-12-08 4:49 ` Florian Fainelli
5 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2023-12-08 4:49 UTC (permalink / raw)
To: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek
Cc: Andrew Davis, Andrew Lunn, Arnd Bergmann, Bjorn Andersson,
Chen-Yu Tsai, Dmitry Baryshkov, Jonathan Corbet, Michal Simek,
Neil Armstrong, Nishanth Menon, Olof Johansson,
Rafał Miłecki, Heiko Stuebner, Laurent Pinchart,
Konrad Dybcio, Geert Uytterhoeven, linux-rockchip,
linux-samsung-soc, linux-amlogic, linux-arm-msm, workflows,
linux-doc
On 12/3/2023 9:46 AM, Krzysztof Kozlowski wrote:
> Document preferred coding style for Devicetree sources (DTS and DTSI),
> to bring consistency among all (sub)architectures and ease in reviews.
>
> Cc: Andrew Davis <afd@ti.com>
> cc: Andrew Lunn <andrew@lunn.ch>
> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Bjorn Andersson <andersson@kernel.org>
> Cc: Chen-Yu Tsai <wens@kernel.org>
> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Michal Simek <michal.simek@amd.com>
> Cc: Neil Armstrong <neil.armstrong@linaro.org>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Olof Johansson <olof@lixom.net>
> Cc: Rafał Miłecki <zajec5@gmail.com>
> Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
> Acked-by: Heiko Stuebner <heiko@sntech.de>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Acked-by: Konrad Dybcio <konradybcio@kernel.org>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
^ permalink raw reply [flat|nested] 8+ messages in thread