* [PATCH v2] dt-bindings: samsung: document preferred compatible naming
@ 2022-07-05 16:13 Krzysztof Kozlowski
2022-07-06 16:00 ` Rob Herring
2022-07-06 16:06 ` Krzysztof Kozlowski
0 siblings, 2 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 16:13 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alim Akhtar, Rob Herring, linux-arm-kernel,
linux-samsung-soc, devicetree, linux-kernel
Compatibles can come in two formats. Either "vendor,ip-soc" or
"vendor,soc-ip". Add a DT schema documenting preferred policy and
enforcing it for all new compatibles, except few existing patterns. The
schema also disallows wild-cards used in SoC compatibles.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Changes since v1:
1. Update comment.
---
.../bindings/arm/samsung/samsung-soc.yaml | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml
diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml b/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml
new file mode 100644
index 000000000000..653f85997643
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/samsung/samsung-soc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung S3C, S5P and Exynos SoC compatibles naming convention
+
+maintainers:
+ - Krzysztof Kozlowski <krzk@kernel.org>
+
+description: |
+ Guidelines for new compatibles for SoC blocks/components.
+ When adding new compatibles in new bindings, use the format::
+ samsung,SoC-IP
+
+ For example::
+ samsung,exynos5433-cmu-isp
+
+select:
+ properties:
+ compatible:
+ pattern: "^samsung,.*(s3c|s5pv|exynos)[0-9a-z]+.*$"
+ required:
+ - compatible
+
+properties:
+ compatible:
+ oneOf:
+ - description: Preferred naming style for compatibles of SoC components
+ pattern: "^samsung,(s3c|s5pv|exynos|exynosautov)[0-9]+-.*$"
+
+ # Legacy compatibles with wild-cards - list cannot grow with new bindings:
+ - enum:
+ - samsung,exynos4x12-pinctrl
+ - samsung,exynos4x12-usb2-phy
+ - samsung,s3c64xx-pinctrl
+ - samsung,s3c64xx-wakeup-eint
+
+additionalProperties: true
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] dt-bindings: samsung: document preferred compatible naming
2022-07-05 16:13 [PATCH v2] dt-bindings: samsung: document preferred compatible naming Krzysztof Kozlowski
@ 2022-07-06 16:00 ` Rob Herring
2022-07-06 16:06 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2022-07-06 16:00 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: linux-samsung-soc, linux-kernel, linux-arm-kernel, Alim Akhtar,
Rob Herring, devicetree
On Tue, 05 Jul 2022 18:13:40 +0200, Krzysztof Kozlowski wrote:
> Compatibles can come in two formats. Either "vendor,ip-soc" or
> "vendor,soc-ip". Add a DT schema documenting preferred policy and
> enforcing it for all new compatibles, except few existing patterns. The
> schema also disallows wild-cards used in SoC compatibles.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Changes since v1:
> 1. Update comment.
> ---
> .../bindings/arm/samsung/samsung-soc.yaml | 40 +++++++++++++++++++
> 1 file changed, 40 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] dt-bindings: samsung: document preferred compatible naming
2022-07-05 16:13 [PATCH v2] dt-bindings: samsung: document preferred compatible naming Krzysztof Kozlowski
2022-07-06 16:00 ` Rob Herring
@ 2022-07-06 16:06 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-06 16:06 UTC (permalink / raw)
To: devicetree, alim.akhtar, krzysztof.kozlowski, linux-samsung-soc,
robh+dt, linux-kernel, linux-arm-kernel
On Tue, 5 Jul 2022 18:13:40 +0200, Krzysztof Kozlowski wrote:
> Compatibles can come in two formats. Either "vendor,ip-soc" or
> "vendor,soc-ip". Add a DT schema documenting preferred policy and
> enforcing it for all new compatibles, except few existing patterns. The
> schema also disallows wild-cards used in SoC compatibles.
>
>
Applied, thanks!
[1/1] dt-bindings: samsung: document preferred compatible naming
https://git.kernel.org/krzk/linux/c/30e1f7bb96a918b6551ff5f97dd9f144aa04386d
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-06 16:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-05 16:13 [PATCH v2] dt-bindings: samsung: document preferred compatible naming Krzysztof Kozlowski
2022-07-06 16:00 ` Rob Herring
2022-07-06 16:06 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox