* [PATCH v2] dt-bindings: usb: connector: disallow additional properties
@ 2023-07-25 10:23 Krzysztof Kozlowski
2023-07-25 10:35 ` Krzysztof Kozlowski
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-25 10:23 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Benson Leung,
Guenter Roeck, Andy Gross, Bjorn Andersson, Konrad Dybcio,
Greg Kroah-Hartman, Prashant Malani, Wayne Chang, devicetree,
chrome-platform, linux-kernel, linux-arm-msm, linux-usb
Cc: Krzysztof Kozlowski
USB connector bindings is complete, thus no additional properties should
be allowed. Add missing 'reg' property and change additionalProperties
to false, so the schema will check for anything not unexpected. This
also allows to drop the 'reg' from other bindings referencing the
usb-connector.yaml and make it required.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Changes in v2:
1. Make usb-connector.yaml additionalProperties:false (Rob)
v1:
https://lore.kernel.org/all/20230723071105.40157-1-krzysztof.kozlowski@linaro.org/
---
.../devicetree/bindings/chrome/google,cros-ec-typec.yaml | 6 ++----
.../devicetree/bindings/connector/usb-connector.yaml | 5 ++++-
.../devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml | 6 ------
Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml | 6 ++----
4 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml b/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml
index 3b0548c34791..9f9816fbecbc 100644
--- a/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml
+++ b/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml
@@ -29,10 +29,8 @@ properties:
patternProperties:
'^connector@[0-9a-f]+$':
$ref: /schemas/connector/usb-connector.yaml#
- unevaluatedProperties: false
- properties:
- reg:
- maxItems: 1
+ required:
+ - reg
required:
- compatible
diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml
index 1c4d3eb87763..e1b8b8b63120 100644
--- a/Documentation/devicetree/bindings/connector/usb-connector.yaml
+++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml
@@ -30,6 +30,9 @@ properties:
- const: samsung,usb-connector-11pin
- const: usb-b-connector
+ reg:
+ maxItems: 1
+
label:
description: Symbolic name for the connector.
@@ -264,7 +267,7 @@ anyOf:
- typec-power-opmode
- new-source-frs-typec-current
-additionalProperties: true
+additionalProperties: false
examples:
# Micro-USB connector with HS lines routed via controller (MUIC).
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
index 6440dc801387..bceb479f74c5 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
@@ -38,15 +38,9 @@ properties:
patternProperties:
'^connector@\d$':
$ref: /schemas/connector/usb-connector.yaml#
-
- properties:
- reg: true
-
required:
- reg
- unevaluatedProperties: false
-
required:
- compatible
diff --git a/Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml b/Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml
index 75eec4a9a020..89fc9a434d05 100644
--- a/Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml
+++ b/Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml
@@ -43,10 +43,8 @@ properties:
patternProperties:
'^connector@[01]$':
$ref: /schemas/connector/usb-connector.yaml#
- unevaluatedProperties: false
- properties:
- reg:
- maxItems: 1
+ required:
+ - reg
required:
- compatible
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2] dt-bindings: usb: connector: disallow additional properties
2023-07-25 10:23 [PATCH v2] dt-bindings: usb: connector: disallow additional properties Krzysztof Kozlowski
@ 2023-07-25 10:35 ` Krzysztof Kozlowski
2023-07-27 17:09 ` Rob Herring
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-25 10:35 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Benson Leung,
Guenter Roeck, Andy Gross, Bjorn Andersson, Konrad Dybcio,
Greg Kroah-Hartman, Prashant Malani, Wayne Chang, devicetree,
chrome-platform, linux-kernel, linux-arm-msm, linux-usb
On 25/07/2023 12:23, Krzysztof Kozlowski wrote:
> USB connector bindings is complete, thus no additional properties should
> be allowed. Add missing 'reg' property and change additionalProperties
> to false, so the schema will check for anything not unexpected. This
An MIT linguistics professor was lecturing his class the other day. "In
English," he said, "a double negative forms a positive. However, in some
languages, such as Polish, a double negative remains a negative. But
there isn't a single language, not one, in which a double positive can
express a negative."
A voice from the back of the room piped up, "Yeah, right."
Obviously:
"... will check for anything unexpected".
> also allows to drop the 'reg' from other bindings referencing the
> usb-connector.yaml and make it required.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v2] dt-bindings: usb: connector: disallow additional properties
2023-07-25 10:23 [PATCH v2] dt-bindings: usb: connector: disallow additional properties Krzysztof Kozlowski
2023-07-25 10:35 ` Krzysztof Kozlowski
@ 2023-07-27 17:09 ` Rob Herring
2023-09-11 4:31 ` patchwork-bot+chrome-platform
2023-09-11 4:49 ` patchwork-bot+chrome-platform
3 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2023-07-27 17:09 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Greg Kroah-Hartman, linux-kernel, Bjorn Andersson, Conor Dooley,
Guenter Roeck, Prashant Malani, Andy Gross, linux-arm-msm,
linux-usb, devicetree, Rob Herring, Konrad Dybcio, Wayne Chang,
Benson Leung, Krzysztof Kozlowski, chrome-platform
On Tue, 25 Jul 2023 12:23:25 +0200, Krzysztof Kozlowski wrote:
> USB connector bindings is complete, thus no additional properties should
> be allowed. Add missing 'reg' property and change additionalProperties
> to false, so the schema will check for anything not unexpected. This
> also allows to drop the 'reg' from other bindings referencing the
> usb-connector.yaml and make it required.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Changes in v2:
> 1. Make usb-connector.yaml additionalProperties:false (Rob)
>
> v1:
> https://lore.kernel.org/all/20230723071105.40157-1-krzysztof.kozlowski@linaro.org/
> ---
> .../devicetree/bindings/chrome/google,cros-ec-typec.yaml | 6 ++----
> .../devicetree/bindings/connector/usb-connector.yaml | 5 ++++-
> .../devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml | 6 ------
> Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml | 6 ++----
> 4 files changed, 8 insertions(+), 15 deletions(-)
>
I didn't not fix the double negative and applied, thanks! ;)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] dt-bindings: usb: connector: disallow additional properties
2023-07-25 10:23 [PATCH v2] dt-bindings: usb: connector: disallow additional properties Krzysztof Kozlowski
2023-07-25 10:35 ` Krzysztof Kozlowski
2023-07-27 17:09 ` Rob Herring
@ 2023-09-11 4:31 ` patchwork-bot+chrome-platform
2023-09-11 4:49 ` patchwork-bot+chrome-platform
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+chrome-platform @ 2023-09-11 4:31 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, bleung, groeck, agross,
andersson, konrad.dybcio, gregkh, pmalani, waynec, devicetree,
chrome-platform, linux-kernel, linux-arm-msm, linux-usb
Hello:
This patch was applied to chrome-platform/linux.git (for-kernelci)
by Rob Herring <robh@kernel.org>:
On Tue, 25 Jul 2023 12:23:25 +0200 you wrote:
> USB connector bindings is complete, thus no additional properties should
> be allowed. Add missing 'reg' property and change additionalProperties
> to false, so the schema will check for anything not unexpected. This
> also allows to drop the 'reg' from other bindings referencing the
> usb-connector.yaml and make it required.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> [...]
Here is the summary with links:
- [v2] dt-bindings: usb: connector: disallow additional properties
https://git.kernel.org/chrome-platform/c/e251a4e28a27
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v2] dt-bindings: usb: connector: disallow additional properties
2023-07-25 10:23 [PATCH v2] dt-bindings: usb: connector: disallow additional properties Krzysztof Kozlowski
` (2 preceding siblings ...)
2023-09-11 4:31 ` patchwork-bot+chrome-platform
@ 2023-09-11 4:49 ` patchwork-bot+chrome-platform
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+chrome-platform @ 2023-09-11 4:49 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, bleung, groeck, agross,
andersson, konrad.dybcio, gregkh, pmalani, waynec, devicetree,
chrome-platform, linux-kernel, linux-arm-msm, linux-usb
Hello:
This patch was applied to chrome-platform/linux.git (for-next)
by Rob Herring <robh@kernel.org>:
On Tue, 25 Jul 2023 12:23:25 +0200 you wrote:
> USB connector bindings is complete, thus no additional properties should
> be allowed. Add missing 'reg' property and change additionalProperties
> to false, so the schema will check for anything not unexpected. This
> also allows to drop the 'reg' from other bindings referencing the
> usb-connector.yaml and make it required.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> [...]
Here is the summary with links:
- [v2] dt-bindings: usb: connector: disallow additional properties
https://git.kernel.org/chrome-platform/c/e251a4e28a27
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-09-11 4:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-25 10:23 [PATCH v2] dt-bindings: usb: connector: disallow additional properties Krzysztof Kozlowski
2023-07-25 10:35 ` Krzysztof Kozlowski
2023-07-27 17:09 ` Rob Herring
2023-09-11 4:31 ` patchwork-bot+chrome-platform
2023-09-11 4:49 ` patchwork-bot+chrome-platform
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox