From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Alim Akhtar <alim.akhtar@samsung.com>, Rob Herring <robh+dt@kernel.org>, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: samsung: soc: match preferred naming in entire compatible Date: Mon, 26 Sep 2022 14:47:57 +0200 [thread overview] Message-ID: <20220926124757.475471-1-krzysztof.kozlowski@linaro.org> (raw) Compatible is a string-array, therefore the "select" should look for anything containing Samsung SoC part. This allows to validate cases like: - "samsung,exynos5250-gsc", "samsung,exynos5-gsc" - "samsung,exynos5250-pmu", "syscon" - "tesla,fsd-mct", "samsung,exynos4210-mct" Since Tesla FSD builts on top of Exynos blocks, add an adidtional pattern for it. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- .../bindings/arm/samsung/samsung-soc.yaml | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml b/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml index 653f85997643..bb1fdc205b44 100644 --- a/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml +++ b/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml @@ -18,17 +18,33 @@ description: | samsung,exynos5433-cmu-isp select: - properties: - compatible: - pattern: "^samsung,.*(s3c|s5pv|exynos)[0-9a-z]+.*$" + allOf: + - properties: + $nodename: + pattern: '^[a-z]' + - properties: + compatible: + contains: + 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]+-.*$" + - description: Preferred naming style for compatibles of S3C/S5P/Exynos SoC components + minItems: 1 + items: + - pattern: "^samsung,(s3c|s5pv|exynos|exynosautov)[0-9]+-.*$" + - {} + - {} + + - description: Preferred naming style for compatibles of Tesla FSD SoC components + minItems: 1 + items: + - pattern: "^tesla,fsd-.*$" + - {} + - {} # Legacy compatibles with wild-cards - list cannot grow with new bindings: - enum: -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Alim Akhtar <alim.akhtar@samsung.com>, Rob Herring <robh+dt@kernel.org>, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: samsung: soc: match preferred naming in entire compatible Date: Mon, 26 Sep 2022 14:47:57 +0200 [thread overview] Message-ID: <20220926124757.475471-1-krzysztof.kozlowski@linaro.org> (raw) Compatible is a string-array, therefore the "select" should look for anything containing Samsung SoC part. This allows to validate cases like: - "samsung,exynos5250-gsc", "samsung,exynos5-gsc" - "samsung,exynos5250-pmu", "syscon" - "tesla,fsd-mct", "samsung,exynos4210-mct" Since Tesla FSD builts on top of Exynos blocks, add an adidtional pattern for it. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- .../bindings/arm/samsung/samsung-soc.yaml | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml b/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml index 653f85997643..bb1fdc205b44 100644 --- a/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml +++ b/Documentation/devicetree/bindings/arm/samsung/samsung-soc.yaml @@ -18,17 +18,33 @@ description: | samsung,exynos5433-cmu-isp select: - properties: - compatible: - pattern: "^samsung,.*(s3c|s5pv|exynos)[0-9a-z]+.*$" + allOf: + - properties: + $nodename: + pattern: '^[a-z]' + - properties: + compatible: + contains: + 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]+-.*$" + - description: Preferred naming style for compatibles of S3C/S5P/Exynos SoC components + minItems: 1 + items: + - pattern: "^samsung,(s3c|s5pv|exynos|exynosautov)[0-9]+-.*$" + - {} + - {} + + - description: Preferred naming style for compatibles of Tesla FSD SoC components + minItems: 1 + items: + - pattern: "^tesla,fsd-.*$" + - {} + - {} # Legacy compatibles with wild-cards - list cannot grow with new bindings: - enum: -- 2.34.1
next reply other threads:[~2022-09-26 12:49 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-26 12:47 Krzysztof Kozlowski [this message] 2022-09-26 12:47 ` [PATCH] dt-bindings: samsung: soc: match preferred naming in entire compatible Krzysztof Kozlowski 2022-09-29 21:28 ` Rob Herring 2022-09-29 21:28 ` Rob Herring 2022-09-30 7:07 ` Krzysztof Kozlowski 2022-09-30 7:07 ` Krzysztof Kozlowski
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=20220926124757.475471-1-krzysztof.kozlowski@linaro.org \ --to=krzysztof.kozlowski@linaro.org \ --cc=alim.akhtar@samsung.com \ --cc=devicetree@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=robh+dt@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.