linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: Move fixed string 'patternProperties' to 'properties'
@ 2021-07-13 19:35 Rob Herring
  2021-07-13 19:47 ` Guenter Roeck
  2021-07-14 11:14 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring @ 2021-07-13 19:35 UTC (permalink / raw)
  To: devicetree
  Cc: linux-kernel, Jean Delvare, Guenter Roeck,
	Kishon Vijay Abraham I, Vinod Koul, Saravanan Sekar, Mark Brown,
	Jagan Teki, Troy Kisky, linux-hwmon, linux-phy, linux-spi

There's no need for fixed strings to be under 'patternProperties', so move
them under 'properties' instead.

Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Saravanan Sekar <sravanhome@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Troy Kisky <troy.kisky@boundarydevices.com>
Cc: linux-hwmon@vger.kernel.org
Cc: linux-phy@lists.infradead.org
Cc: linux-spi@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../devicetree/bindings/hwmon/adt7475.yaml    | 22 ++++----
 .../bindings/phy/ti,phy-j721e-wiz.yaml        | 56 +++++++++----------
 .../bindings/regulator/mps,mpq7920.yaml       |  6 +-
 .../regulator/nxp,pf8x00-regulator.yaml       |  3 +-
 .../bindings/spi/spi-controller.yaml          | 32 +++++------
 5 files changed, 60 insertions(+), 59 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/adt7475.yaml b/Documentation/devicetree/bindings/hwmon/adt7475.yaml
index ad0ec9f35bd8..7d9c083632b9 100644
--- a/Documentation/devicetree/bindings/hwmon/adt7475.yaml
+++ b/Documentation/devicetree/bindings/hwmon/adt7475.yaml
@@ -39,17 +39,7 @@ properties:
   reg:
     maxItems: 1
 
-patternProperties:
-  "^adi,bypass-attenuator-in[0-4]$":
-    description: |
-      Configures bypassing the individual voltage input attenuator. If
-      set to 1 the attenuator is bypassed if set to 0 the attenuator is
-      not bypassed. If the property is absent then the attenuator
-      retains it's configuration from the bios/bootloader.
-    $ref: /schemas/types.yaml#/definitions/uint32
-    enum: [0, 1]
-
-  "^adi,pwm-active-state$":
+  adi,pwm-active-state:
     description: |
       Integer array, represents the active state of the pwm outputs If set to 0
       the pwm uses a logic low output for 100% duty cycle. If set to 1 the pwm
@@ -61,6 +51,16 @@ patternProperties:
       enum: [0, 1]
       default: 1
 
+patternProperties:
+  "^adi,bypass-attenuator-in[0-4]$":
+    description: |
+      Configures bypassing the individual voltage input attenuator. If
+      set to 1 the attenuator is bypassed if set to 0 the attenuator is
+      not bypassed. If the property is absent then the attenuator
+      retains it's configuration from the bios/bootloader.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0, 1]
+
 required:
   - compatible
   - reg
diff --git a/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml b/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml
index 5272b6f284ba..dcd63908aeae 100644
--- a/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml
+++ b/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml
@@ -77,6 +77,34 @@ properties:
       Type-C spec states minimum CC pin debounce of 100 ms and maximum
       of 200 ms. However, some solutions might need more than 200 ms.
 
+  refclk-dig:
+    type: object
+    description: |
+      WIZ node should have subnode for refclk_dig to select the reference
+      clock source for the reference clock used in the PHY and PMA digital
+      logic.
+    properties:
+      clocks:
+        minItems: 2
+        maxItems: 4
+        description: Phandle to two (Torrent) or four (Sierra) clock nodes representing
+          the inputs to refclk_dig
+
+      "#clock-cells":
+        const: 0
+
+      assigned-clocks:
+        maxItems: 1
+
+      assigned-clock-parents:
+        maxItems: 1
+
+    required:
+      - clocks
+      - "#clock-cells"
+      - assigned-clocks
+      - assigned-clock-parents
+
 patternProperties:
   "^pll[0|1]-refclk$":
     type: object
@@ -121,34 +149,6 @@ patternProperties:
       - clocks
       - "#clock-cells"
 
-  "^refclk-dig$":
-    type: object
-    description: |
-      WIZ node should have subnode for refclk_dig to select the reference
-      clock source for the reference clock used in the PHY and PMA digital
-      logic.
-    properties:
-      clocks:
-        minItems: 2
-        maxItems: 4
-        description: Phandle to two (Torrent) or four (Sierra) clock nodes representing
-          the inputs to refclk_dig
-
-      "#clock-cells":
-        const: 0
-
-      assigned-clocks:
-        maxItems: 1
-
-      assigned-clock-parents:
-        maxItems: 1
-
-    required:
-      - clocks
-      - "#clock-cells"
-      - assigned-clocks
-      - assigned-clock-parents
-
   "^serdes@[0-9a-f]+$":
     type: object
     description: |
diff --git a/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml b/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml
index 12b8963615c3..c2e8c54e5311 100644
--- a/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml
+++ b/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml
@@ -36,12 +36,12 @@ properties:
           switching frequency must be one of following corresponding value
           1.1MHz, 1.65MHz, 2.2MHz, 2.75MHz
 
-    patternProperties:
-      "^ldo[1-4]$":
+      ldortc:
         type: object
         $ref: regulator.yaml#
 
-      "^ldortc$":
+    patternProperties:
+      "^ldo[1-4]$":
         type: object
         $ref: regulator.yaml#
 
diff --git a/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml b/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml
index 8761437ed8ad..aabf50f5b39e 100644
--- a/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml
@@ -83,7 +83,8 @@ properties:
 
         unevaluatedProperties: false
 
-      "^vsnvs$":
+    properties:
+      vsnvs:
         type: object
         $ref: regulator.yaml#
         description:
diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml
index faef4f6f55b8..8246891602e7 100644
--- a/Documentation/devicetree/bindings/spi/spi-controller.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml
@@ -79,22 +79,7 @@ properties:
     description:
       The SPI controller acts as a slave, instead of a master.
 
-allOf:
-  - if:
-      not:
-        required:
-          - spi-slave
-    then:
-      properties:
-        "#address-cells":
-          const: 1
-    else:
-      properties:
-        "#address-cells":
-          const: 0
-
-patternProperties:
-  "^slave$":
+  slave:
     type: object
 
     properties:
@@ -105,6 +90,7 @@ patternProperties:
     required:
       - compatible
 
+patternProperties:
   "^.*@[0-9a-f]+$":
     type: object
 
@@ -180,6 +166,20 @@ patternProperties:
       - compatible
       - reg
 
+allOf:
+  - if:
+      not:
+        required:
+          - spi-slave
+    then:
+      properties:
+        "#address-cells":
+          const: 1
+    else:
+      properties:
+        "#address-cells":
+          const: 0
+
 additionalProperties: true
 
 examples:
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: Move fixed string 'patternProperties' to 'properties'
  2021-07-13 19:35 [PATCH] dt-bindings: Move fixed string 'patternProperties' to 'properties' Rob Herring
@ 2021-07-13 19:47 ` Guenter Roeck
  2021-07-14 11:14 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2021-07-13 19:47 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, linux-kernel, Jean Delvare, Kishon Vijay Abraham I,
	Vinod Koul, Saravanan Sekar, Mark Brown, Jagan Teki, Troy Kisky,
	linux-hwmon, linux-phy, linux-spi

On Tue, Jul 13, 2021 at 01:35:14PM -0600, Rob Herring wrote:
> There's no need for fixed strings to be under 'patternProperties', so move
> them under 'properties' instead.
> 
> Cc: Jean Delvare <jdelvare@suse.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Saravanan Sekar <sravanhome@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Jagan Teki <jagan@amarulasolutions.com>
> Cc: Troy Kisky <troy.kisky@boundarydevices.com>
> Cc: linux-hwmon@vger.kernel.org
> Cc: linux-phy@lists.infradead.org
> Cc: linux-spi@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  .../devicetree/bindings/hwmon/adt7475.yaml    | 22 ++++----

Acked-by: Guenter Roeck <linux@roeck-us.net>

>  .../bindings/phy/ti,phy-j721e-wiz.yaml        | 56 +++++++++----------
>  .../bindings/regulator/mps,mpq7920.yaml       |  6 +-
>  .../regulator/nxp,pf8x00-regulator.yaml       |  3 +-
>  .../bindings/spi/spi-controller.yaml          | 32 +++++------
>  5 files changed, 60 insertions(+), 59 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/adt7475.yaml b/Documentation/devicetree/bindings/hwmon/adt7475.yaml
> index ad0ec9f35bd8..7d9c083632b9 100644
> --- a/Documentation/devicetree/bindings/hwmon/adt7475.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/adt7475.yaml
> @@ -39,17 +39,7 @@ properties:
>    reg:
>      maxItems: 1
>  
> -patternProperties:
> -  "^adi,bypass-attenuator-in[0-4]$":
> -    description: |
> -      Configures bypassing the individual voltage input attenuator. If
> -      set to 1 the attenuator is bypassed if set to 0 the attenuator is
> -      not bypassed. If the property is absent then the attenuator
> -      retains it's configuration from the bios/bootloader.
> -    $ref: /schemas/types.yaml#/definitions/uint32
> -    enum: [0, 1]
> -
> -  "^adi,pwm-active-state$":
> +  adi,pwm-active-state:
>      description: |
>        Integer array, represents the active state of the pwm outputs If set to 0
>        the pwm uses a logic low output for 100% duty cycle. If set to 1 the pwm
> @@ -61,6 +51,16 @@ patternProperties:
>        enum: [0, 1]
>        default: 1
>  
> +patternProperties:
> +  "^adi,bypass-attenuator-in[0-4]$":
> +    description: |
> +      Configures bypassing the individual voltage input attenuator. If
> +      set to 1 the attenuator is bypassed if set to 0 the attenuator is
> +      not bypassed. If the property is absent then the attenuator
> +      retains it's configuration from the bios/bootloader.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [0, 1]
> +
>  required:
>    - compatible
>    - reg
> diff --git a/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml b/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml
> index 5272b6f284ba..dcd63908aeae 100644
> --- a/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml
> +++ b/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml
> @@ -77,6 +77,34 @@ properties:
>        Type-C spec states minimum CC pin debounce of 100 ms and maximum
>        of 200 ms. However, some solutions might need more than 200 ms.
>  
> +  refclk-dig:
> +    type: object
> +    description: |
> +      WIZ node should have subnode for refclk_dig to select the reference
> +      clock source for the reference clock used in the PHY and PMA digital
> +      logic.
> +    properties:
> +      clocks:
> +        minItems: 2
> +        maxItems: 4
> +        description: Phandle to two (Torrent) or four (Sierra) clock nodes representing
> +          the inputs to refclk_dig
> +
> +      "#clock-cells":
> +        const: 0
> +
> +      assigned-clocks:
> +        maxItems: 1
> +
> +      assigned-clock-parents:
> +        maxItems: 1
> +
> +    required:
> +      - clocks
> +      - "#clock-cells"
> +      - assigned-clocks
> +      - assigned-clock-parents
> +
>  patternProperties:
>    "^pll[0|1]-refclk$":
>      type: object
> @@ -121,34 +149,6 @@ patternProperties:
>        - clocks
>        - "#clock-cells"
>  
> -  "^refclk-dig$":
> -    type: object
> -    description: |
> -      WIZ node should have subnode for refclk_dig to select the reference
> -      clock source for the reference clock used in the PHY and PMA digital
> -      logic.
> -    properties:
> -      clocks:
> -        minItems: 2
> -        maxItems: 4
> -        description: Phandle to two (Torrent) or four (Sierra) clock nodes representing
> -          the inputs to refclk_dig
> -
> -      "#clock-cells":
> -        const: 0
> -
> -      assigned-clocks:
> -        maxItems: 1
> -
> -      assigned-clock-parents:
> -        maxItems: 1
> -
> -    required:
> -      - clocks
> -      - "#clock-cells"
> -      - assigned-clocks
> -      - assigned-clock-parents
> -
>    "^serdes@[0-9a-f]+$":
>      type: object
>      description: |
> diff --git a/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml b/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml
> index 12b8963615c3..c2e8c54e5311 100644
> --- a/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml
> +++ b/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml
> @@ -36,12 +36,12 @@ properties:
>            switching frequency must be one of following corresponding value
>            1.1MHz, 1.65MHz, 2.2MHz, 2.75MHz
>  
> -    patternProperties:
> -      "^ldo[1-4]$":
> +      ldortc:
>          type: object
>          $ref: regulator.yaml#
>  
> -      "^ldortc$":
> +    patternProperties:
> +      "^ldo[1-4]$":
>          type: object
>          $ref: regulator.yaml#
>  
> diff --git a/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml b/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml
> index 8761437ed8ad..aabf50f5b39e 100644
> --- a/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml
> +++ b/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml
> @@ -83,7 +83,8 @@ properties:
>  
>          unevaluatedProperties: false
>  
> -      "^vsnvs$":
> +    properties:
> +      vsnvs:
>          type: object
>          $ref: regulator.yaml#
>          description:
> diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml
> index faef4f6f55b8..8246891602e7 100644
> --- a/Documentation/devicetree/bindings/spi/spi-controller.yaml
> +++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml
> @@ -79,22 +79,7 @@ properties:
>      description:
>        The SPI controller acts as a slave, instead of a master.
>  
> -allOf:
> -  - if:
> -      not:
> -        required:
> -          - spi-slave
> -    then:
> -      properties:
> -        "#address-cells":
> -          const: 1
> -    else:
> -      properties:
> -        "#address-cells":
> -          const: 0
> -
> -patternProperties:
> -  "^slave$":
> +  slave:
>      type: object
>  
>      properties:
> @@ -105,6 +90,7 @@ patternProperties:
>      required:
>        - compatible
>  
> +patternProperties:
>    "^.*@[0-9a-f]+$":
>      type: object
>  
> @@ -180,6 +166,20 @@ patternProperties:
>        - compatible
>        - reg
>  
> +allOf:
> +  - if:
> +      not:
> +        required:
> +          - spi-slave
> +    then:
> +      properties:
> +        "#address-cells":
> +          const: 1
> +    else:
> +      properties:
> +        "#address-cells":
> +          const: 0
> +
>  additionalProperties: true
>  
>  examples:
> -- 
> 2.27.0
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: Move fixed string 'patternProperties' to 'properties'
  2021-07-13 19:35 [PATCH] dt-bindings: Move fixed string 'patternProperties' to 'properties' Rob Herring
  2021-07-13 19:47 ` Guenter Roeck
@ 2021-07-14 11:14 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-07-14 11:14 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, linux-kernel, Jean Delvare, Guenter Roeck,
	Kishon Vijay Abraham I, Vinod Koul, Saravanan Sekar, Jagan Teki,
	Troy Kisky, linux-hwmon, linux-phy, linux-spi

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

On Tue, Jul 13, 2021 at 01:35:14PM -0600, Rob Herring wrote:
> There's no need for fixed strings to be under 'patternProperties', so move
> them under 'properties' instead.

Acked-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-14 11:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13 19:35 [PATCH] dt-bindings: Move fixed string 'patternProperties' to 'properties' Rob Herring
2021-07-13 19:47 ` Guenter Roeck
2021-07-14 11:14 ` Mark Brown

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).