diff mbox series

[v2,1/3] dt-bindings: i2c: Add required properties

Message ID 20250516124349.58318-1-akhilrajeev@nvidia.com
State New
Headers show
Series [v2,1/3] dt-bindings: i2c: Add required properties | expand

Commit Message

Akhil R May 16, 2025, 12:43 p.m. UTC
Add required DT properties for Tegra I2C controllers.

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
---
v1->v2:
  * Added all required properties

 .../bindings/i2c/nvidia,tegra20-i2c.yaml      | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Comments

Akhil R May 26, 2025, 5:29 a.m. UTC | #1
> On 16/05/2025 13:53, Krzysztof Kozlowski wrote:
> > On 16/05/2025 14:43, Akhil R wrote:
> >> Add required DT properties for Tegra I2C controllers.
> >
> > Why? Required by whom/what? Some context or any justification is
> > needed here. Are you breaking the ABI (means: prove that you are not).
> >
> > Please use subject prefixes matching the subsystem. You can get them
> > for example with `git log --oneline -- DIRECTORY_OR_FILE` on the
> > directory your patch is touching. For bindings, the preferred subjects
> > are explained here:
> > https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-
> > patches.html#i-for-patch-submitters
> >
> >>
> >> Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
> >> ---
> >> v1->v2:
> >>    * Added all required properties
> >>
> >>   .../bindings/i2c/nvidia,tegra20-i2c.yaml      | 19 +++++++++++++++++++
> >>   1 file changed, 19 insertions(+)
> >>
> >> diff --git
> >> a/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
> >> b/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
> >> index 19aefc022c8b..0717f2304cfc 100644
> >> --- a/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
> >> +++ b/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
> >> @@ -118,6 +118,13 @@ properties:
> >>         - const: rx
> >>         - const: tx
> >>
> >> +required:
> >> +  - compatible
> >> +  - reg
> >> +  - interrupts
> >> +  - clocks
> >> +  - clock-names
> >> +
> >>   allOf:
> >>     - $ref: /schemas/i2c/i2c-controller.yaml
> >>     - if:
> >> @@ -171,6 +178,18 @@ allOf:
> >>         properties:
> >>           power-domains: false
> >>
> >> +  - if:
> >> +      not:
> >> +        properties:
> >> +          compatible:
> >> +            contains:
> >> +              enum:
> >> +                - nvidia,tegra194-i2c
> >> +    then:
> >> +        required:
> >
> > Never tested, so quite dissapointing.
> >
> > Test your patches before sending, not after.
> 
> ACK. Clearly we need to do a better job here. It is noted.

ACK to the comments. Updated the commit description and fixed the indentation
issue and sent out a new version.
https://lore.kernel.org/lkml/20250526052553.42766-1-akhilrajeev@nvidia.com/T/#t

I ran the below tests, did not see any error or warning with the new version.

make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
make DT_CHECKER_FLAGS=-m dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml

Regards,
Akhil
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml b/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
index 19aefc022c8b..0717f2304cfc 100644
--- a/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
@@ -118,6 +118,13 @@  properties:
       - const: rx
       - const: tx
 
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+
 allOf:
   - $ref: /schemas/i2c/i2c-controller.yaml
   - if:
@@ -171,6 +178,18 @@  allOf:
       properties:
         power-domains: false
 
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - nvidia,tegra194-i2c
+    then:
+        required:
+          - resets
+          - reset-names
+
 unevaluatedProperties: false
 
 examples: