diff mbox series

[1/4] dt-bindings: pinctrl: qcom,pmic-gpio: add 'gpio-reserved-ranges'

Message ID 20220508135932.132378-2-krzysztof.kozlowski@linaro.org
State New
Headers show
Series dt-bindings/pinctrl/arm: qcom: second round of minor cleanups of QCOM PMIC pinctrl | expand

Commit Message

Krzysztof Kozlowski May 8, 2022, 1:59 p.m. UTC
'gpio-reserved-ranges' property is already used and supported by common pinctrl
bindings, so add it also here to fix warnings like:

  qrb5165-rb5.dtb: gpio@c000: 'gpio-reserved-ranges' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,pmic-gpio.yaml      | 53 +++++++++++++++++++
 1 file changed, 53 insertions(+)

Comments

Rob Herring (Arm) May 10, 2022, 4:52 p.m. UTC | #1
On Sun, 08 May 2022 15:59:29 +0200, Krzysztof Kozlowski wrote:
> 'gpio-reserved-ranges' property is already used and supported by common pinctrl
> bindings, so add it also here to fix warnings like:
> 
>   qrb5165-rb5.dtb: gpio@c000: 'gpio-reserved-ranges' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/pinctrl/qcom,pmic-gpio.yaml      | 53 +++++++++++++++++++
>  1 file changed, 53 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Linus Walleij May 13, 2022, 11:18 p.m. UTC | #2
On Sun, May 8, 2022 at 3:59 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:

> 'gpio-reserved-ranges' property is already used and supported by common pinctrl
> bindings, so add it also here to fix warnings like:
>
>   qrb5165-rb5.dtb: gpio@c000: 'gpio-reserved-ranges' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

This does not apply on top of pinctrl's devel branch, am I doing
something wrong?

Yours,
Linus Walleij
Krzysztof Kozlowski May 14, 2022, 7:42 p.m. UTC | #3
On 14/05/2022 01:18, Linus Walleij wrote:
> On Sun, May 8, 2022 at 3:59 PM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
> 
>> 'gpio-reserved-ranges' property is already used and supported by common pinctrl
>> bindings, so add it also here to fix warnings like:
>>
>>   qrb5165-rb5.dtb: gpio@c000: 'gpio-reserved-ranges' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> This does not apply on top of pinctrl's devel branch, am I doing
> something wrong?

Hi Linus,

Sorry for any confusion. This is on top of my previous patchset:
https://lore.kernel.org/all/20220508135932.132378-1-krzysztof.kozlowski@linaro.org/

Best regards,
Krzysztof
Bjorn Andersson May 16, 2022, 3:11 p.m. UTC | #4
On Sun 08 May 06:59 PDT 2022, Krzysztof Kozlowski wrote:

> 'gpio-reserved-ranges' property is already used and supported by common pinctrl
> bindings, so add it also here to fix warnings like:
> 
>   qrb5165-rb5.dtb: gpio@c000: 'gpio-reserved-ranges' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---
>  .../bindings/pinctrl/qcom,pmic-gpio.yaml      | 53 +++++++++++++++++++
>  1 file changed, 53 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> index 7e74a87ccc39..69195660ee2a 100644
> --- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> @@ -78,6 +78,12 @@ properties:
>      minItems: 2
>      maxItems: 44
>  
> +  gpio-reserved-ranges:
> +    minItems: 1
> +    # maxItems as half of total number of GPIOs, as there has to be at
> +    # least one usable GPIO between each reserved range.
> +    maxItems: 22
> +
>    '#gpio-cells':
>      const: 2
>      description:
> @@ -107,6 +113,8 @@ allOf:
>          gpio-line-names:
>            minItems: 2
>            maxItems: 2
> +        gpio-reserved-ranges:
> +          maxItems: 1
>  
>    - if:
>        properties:
> @@ -124,6 +132,9 @@ allOf:
>          gpio-line-names:
>            minItems: 4
>            maxItems: 4
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 2
>  
>    - if:
>        properties:
> @@ -137,6 +148,9 @@ allOf:
>          gpio-line-names:
>            minItems: 6
>            maxItems: 6
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 3
>  
>    - if:
>        properties:
> @@ -150,6 +164,9 @@ allOf:
>          gpio-line-names:
>            minItems: 8
>            maxItems: 8
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 4
>  
>    - if:
>        properties:
> @@ -163,6 +180,9 @@ allOf:
>          gpio-line-names:
>            minItems: 9
>            maxItems: 9
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 5
>  
>    - if:
>        properties:
> @@ -182,6 +202,9 @@ allOf:
>          gpio-line-names:
>            minItems: 10
>            maxItems: 10
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 5
>  
>    - if:
>        properties:
> @@ -194,6 +217,9 @@ allOf:
>          gpio-line-names:
>            minItems: 11
>            maxItems: 11
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 6
>  
>    - if:
>        properties:
> @@ -212,6 +238,9 @@ allOf:
>          gpio-line-names:
>            minItems: 12
>            maxItems: 12
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 6
>  
>    - if:
>        properties:
> @@ -224,6 +253,9 @@ allOf:
>          gpio-line-names:
>            minItems: 13
>            maxItems: 13
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 7
>  
>    - if:
>        properties:
> @@ -236,6 +268,9 @@ allOf:
>          gpio-line-names:
>            minItems: 14
>            maxItems: 14
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 7
>  
>    - if:
>        properties:
> @@ -248,6 +283,9 @@ allOf:
>          gpio-line-names:
>            minItems: 16
>            maxItems: 16
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 8
>  
>    - if:
>        properties:
> @@ -261,6 +299,9 @@ allOf:
>          gpio-line-names:
>            minItems: 22
>            maxItems: 22
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 11
>  
>    - if:
>        properties:
> @@ -273,6 +314,9 @@ allOf:
>          gpio-line-names:
>            minItems: 26
>            maxItems: 26
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 13
>  
>    - if:
>        properties:
> @@ -285,6 +329,9 @@ allOf:
>          gpio-line-names:
>            minItems: 36
>            maxItems: 36
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 18
>  
>    - if:
>        properties:
> @@ -297,6 +344,9 @@ allOf:
>          gpio-line-names:
>            minItems: 38
>            maxItems: 38
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 19
>  
>    - if:
>        properties:
> @@ -310,6 +360,9 @@ allOf:
>          gpio-line-names:
>            minItems: 44
>            maxItems: 44
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 22
>  
>  patternProperties:
>    '-state$':
> -- 
> 2.32.0
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
index 7e74a87ccc39..69195660ee2a 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
@@ -78,6 +78,12 @@  properties:
     minItems: 2
     maxItems: 44
 
+  gpio-reserved-ranges:
+    minItems: 1
+    # maxItems as half of total number of GPIOs, as there has to be at
+    # least one usable GPIO between each reserved range.
+    maxItems: 22
+
   '#gpio-cells':
     const: 2
     description:
@@ -107,6 +113,8 @@  allOf:
         gpio-line-names:
           minItems: 2
           maxItems: 2
+        gpio-reserved-ranges:
+          maxItems: 1
 
   - if:
       properties:
@@ -124,6 +132,9 @@  allOf:
         gpio-line-names:
           minItems: 4
           maxItems: 4
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 2
 
   - if:
       properties:
@@ -137,6 +148,9 @@  allOf:
         gpio-line-names:
           minItems: 6
           maxItems: 6
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 3
 
   - if:
       properties:
@@ -150,6 +164,9 @@  allOf:
         gpio-line-names:
           minItems: 8
           maxItems: 8
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 4
 
   - if:
       properties:
@@ -163,6 +180,9 @@  allOf:
         gpio-line-names:
           minItems: 9
           maxItems: 9
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 5
 
   - if:
       properties:
@@ -182,6 +202,9 @@  allOf:
         gpio-line-names:
           minItems: 10
           maxItems: 10
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 5
 
   - if:
       properties:
@@ -194,6 +217,9 @@  allOf:
         gpio-line-names:
           minItems: 11
           maxItems: 11
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 6
 
   - if:
       properties:
@@ -212,6 +238,9 @@  allOf:
         gpio-line-names:
           minItems: 12
           maxItems: 12
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 6
 
   - if:
       properties:
@@ -224,6 +253,9 @@  allOf:
         gpio-line-names:
           minItems: 13
           maxItems: 13
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 7
 
   - if:
       properties:
@@ -236,6 +268,9 @@  allOf:
         gpio-line-names:
           minItems: 14
           maxItems: 14
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 7
 
   - if:
       properties:
@@ -248,6 +283,9 @@  allOf:
         gpio-line-names:
           minItems: 16
           maxItems: 16
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 8
 
   - if:
       properties:
@@ -261,6 +299,9 @@  allOf:
         gpio-line-names:
           minItems: 22
           maxItems: 22
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 11
 
   - if:
       properties:
@@ -273,6 +314,9 @@  allOf:
         gpio-line-names:
           minItems: 26
           maxItems: 26
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 13
 
   - if:
       properties:
@@ -285,6 +329,9 @@  allOf:
         gpio-line-names:
           minItems: 36
           maxItems: 36
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 18
 
   - if:
       properties:
@@ -297,6 +344,9 @@  allOf:
         gpio-line-names:
           minItems: 38
           maxItems: 38
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 19
 
   - if:
       properties:
@@ -310,6 +360,9 @@  allOf:
         gpio-line-names:
           minItems: 44
           maxItems: 44
+        gpio-reserved-ranges:
+          minItems: 1
+          maxItems: 22
 
 patternProperties:
   '-state$':