* [PATCH] dt-bindings: i2c: stm32-i2c: Move st,syscfg-fmp definition to top level
@ 2022-01-19 17:44 Rob Herring
2022-01-23 15:29 ` Rob Herring
0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2022-01-19 17:44 UTC (permalink / raw)
To: Maxime Coquelin, Alexandre Torgue, Pierre-Yves MORDRET
Cc: linux-i2c, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
It is preferred to define all properties in the main schema and leave
if/then/else schemas to just be further constraints on properties.
Rework the schema to use be more specific for each cell. Previously,
multiple entries of 3 cells each was allowed.
Signed-off-by: Rob Herring <robh@kernel.org>
---
.../devicetree/bindings/i2c/st,stm32-i2c.yaml | 24 ++++++++++---------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml b/Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml
index 46b62e1c9273..dccbb18b6dc0 100644
--- a/Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml
@@ -25,16 +25,9 @@ allOf:
i2c-scl-falling-time-ns:
default: 10
-
- st,syscfg-fmp:
- description: Use to set Fast Mode Plus bit within SYSCFG when
- Fast Mode Plus speed is selected by slave.
- Format is phandle to syscfg / register offset within
- syscfg / register bitmask for FMP bit.
- $ref: "/schemas/types.yaml#/definitions/phandle-array"
- items:
- minItems: 3
- maxItems: 3
+ else:
+ properties:
+ st,syscfg-fmp: false
- if:
properties:
@@ -87,6 +80,16 @@ properties:
minimum: 1
maximum: 1000000
+ st,syscfg-fmp:
+ description: Use to set Fast Mode Plus bit within SYSCFG when Fast Mode
+ Plus speed is selected by slave.
+ $ref: "/schemas/types.yaml#/definitions/phandle-array"
+ items:
+ - items:
+ - description: phandle to syscfg
+ - description: register offset within syscfg
+ - description: register bitmask for FMP bit
+
required:
- compatible
- reg
@@ -147,4 +150,3 @@ examples:
i2c-scl-falling-time-ns = <20>;
st,syscfg-fmp = <&syscfg 0x4 0x2>;
};
-...
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dt-bindings: i2c: stm32-i2c: Move st,syscfg-fmp definition to top level
2022-01-19 17:44 [PATCH] dt-bindings: i2c: stm32-i2c: Move st,syscfg-fmp definition to top level Rob Herring
@ 2022-01-23 15:29 ` Rob Herring
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2022-01-23 15:29 UTC (permalink / raw)
To: Rob Herring
Cc: Pierre-Yves MORDRET, devicetree, Maxime Coquelin, linux-i2c,
linux-stm32, linux-kernel, linux-arm-kernel, Alexandre Torgue
On Wed, 19 Jan 2022 11:44:07 -0600, Rob Herring wrote:
> It is preferred to define all properties in the main schema and leave
> if/then/else schemas to just be further constraints on properties.
>
> Rework the schema to use be more specific for each cell. Previously,
> multiple entries of 3 cells each was allowed.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> .../devicetree/bindings/i2c/st,stm32-i2c.yaml | 24 ++++++++++---------
> 1 file changed, 13 insertions(+), 11 deletions(-)
>
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-23 15:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-19 17:44 [PATCH] dt-bindings: i2c: stm32-i2c: Move st,syscfg-fmp definition to top level Rob Herring
2022-01-23 15:29 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).