From: Conor Dooley <conor@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/4] docs: dt: writing-bindings: Document compatible and filename naming
Date: Mon, 14 Jul 2025 18:20:02 +0100 [thread overview]
Message-ID: <20250714-espionage-overexert-c12cee88d1f4@spud> (raw)
In-Reply-To: <20250713-dt-bindings-docs-v2-2-672c898054ae@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 2435 bytes --]
On Sun, Jul 13, 2025 at 02:46:37PM +0200, Krzysztof Kozlowski wrote:
> Document established Devicetree bindings maintainers review practices:
>
> 1. Compatibles should not use bus suffixes to encode the type of
> interface, because the parent bus node defines that interface, e.g.
> "vendor,device" instead of "vendor,device-i2c" + "vendor,device-spi".
>
> 2. If the compatible represents the device as a whole, it should not
> contain the type of device in the name.
>
> 3. Filenames should match compatible. The best if match is 100%, but if
> binding has multiple compatibles, then one of the fallbacks should be
> used. Alternatively a genericish name is allowed if it follows
> "vendor,device" style.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>
> ---
>
> Changes in v2:
> 1. New patch
> ---
> Documentation/devicetree/bindings/writing-bindings.rst | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/writing-bindings.rst b/Documentation/devicetree/bindings/writing-bindings.rst
> index a2d2afd099c0bd922cf12dcf49f5dffe6da748f1..e63de88385b5bc5859d8d9fca82bcf30380f3e73 100644
> --- a/Documentation/devicetree/bindings/writing-bindings.rst
> +++ b/Documentation/devicetree/bindings/writing-bindings.rst
> @@ -52,6 +52,10 @@ Properties
> fallback if appropriate. SoC-specific compatibles are also preferred for
> the fallbacks.
>
> + - DON'T use bus suffixes to encode the type of interface device is using.
> + The parent bus node already implies that interface. DON'T add the type of
> + device, if the device cannot be anything else.
> +
> - DO use a vendor prefix on device-specific property names. Consider if
> properties could be common among devices of the same class. Check other
> existing bindings for similar devices.
> @@ -101,6 +105,10 @@ Typical cases and caveats
> - "syscon" is not a generic property. Use vendor and type, e.g.
> "vendor,power-manager-syscon".
>
> +- Bindings files should be named like compatible: vendor,device.yaml. In case
> + of multiple compatibles in the binding, use one of the fallbacks or a more
> + generic name, yet still matching compatible style.
> +
> Board/SoC .dts Files
> ====================
>
>
> --
> 2.43.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2025-07-14 17:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-13 12:46 [PATCH v2 0/4] docs: dt: Document established practices: compatible and file naming, subjects Krzysztof Kozlowski
2025-07-13 12:46 ` [PATCH v2 1/4] docs: dt: submitting-patches: Avoid 'YAML' in the subject and add an example Krzysztof Kozlowski
2025-07-14 17:19 ` Conor Dooley
2025-07-14 21:22 ` Rob Herring (Arm)
2025-07-13 12:46 ` [PATCH v2 2/4] docs: dt: writing-bindings: Document compatible and filename naming Krzysztof Kozlowski
2025-07-14 17:20 ` Conor Dooley [this message]
2025-07-14 21:22 ` Rob Herring (Arm)
2025-07-13 12:46 ` [PATCH v2 3/4] docs: dt: writing-bindings: Document discouraged instance IDs Krzysztof Kozlowski
2025-07-14 17:20 ` Conor Dooley
2025-07-14 21:22 ` Rob Herring (Arm)
2025-07-13 12:46 ` [PATCH v2 4/4] docs: dt: writing-schema: Document preferred order of properties Krzysztof Kozlowski
2025-07-14 17:20 ` Conor Dooley
2025-07-14 21:23 ` Rob Herring (Arm)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250714-espionage-overexert-c12cee88d1f4@spud \
--to=conor@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox