diff mbox series

[V7,1/3] dt-bindings: mfd: pm8008: Add gpio-ranges and spmi-gpio compatible

Message ID 1627029074-23449-2-git-send-email-skakit@codeaurora.org
State Accepted
Commit ab09511fb69bdd4c4767053d7766f4bb9d6e36ec
Headers show
Series Convert qcom pmic gpio bindings to YAML | expand

Commit Message

Satya Priya July 23, 2021, 8:31 a.m. UTC
Add gpio-ranges and "qcom,spmi-gpio" compatible to match with the
parent qcom,pmic-gpio.yaml binding.

Signed-off-by: satya priya <skakit@codeaurora.org>
---
Changes in V7:
 - This is newly added in V7 to resolve below error.
 dtschema/dtc warnings/errors:
 /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/qcom,pm8008.example.dt.yaml: gpio@c000: compatible: ['qcom,pm8008-gpio'] is too short
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
 /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/qcom,pm8008.example.dt.yaml: gpio@c000: 'gpio-ranges' is a required property
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml

 Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

Comments

Rob Herring (Arm) July 23, 2021, 10:58 p.m. UTC | #1
On Fri, 23 Jul 2021 14:01:12 +0530, satya priya wrote:
> Add gpio-ranges and "qcom,spmi-gpio" compatible to match with the
> parent qcom,pmic-gpio.yaml binding.
> 
> Signed-off-by: satya priya <skakit@codeaurora.org>
> ---
> Changes in V7:
>  - This is newly added in V7 to resolve below error.
>  dtschema/dtc warnings/errors:
>  /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/qcom,pm8008.example.dt.yaml: gpio@c000: compatible: ['qcom,pm8008-gpio'] is too short
> 	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
>  /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/qcom,pm8008.example.dt.yaml: gpio@c000: 'gpio-ranges' is a required property
> 	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> 
>  Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Bjorn Andersson July 25, 2021, 6:17 p.m. UTC | #2
On Fri 23 Jul 03:31 CDT 2021, satya priya wrote:

> Add gpio-ranges and "qcom,spmi-gpio" compatible to match with the
> parent qcom,pmic-gpio.yaml binding.
> 
> Signed-off-by: satya priya <skakit@codeaurora.org>

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

But it doesn't capture the full binding of qcom,pm8008-gpio - which is
properly described by the end of this series. As such I expect that any
non-trivial usage of the pm8008-gpio in a dts will fail dts validation.

I still think this patch can be merged, but I don't think we're done
expressing the PMIC bindings.

Regards,
Bjorn

> ---
> Changes in V7:
>  - This is newly added in V7 to resolve below error.
>  dtschema/dtc warnings/errors:
>  /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/qcom,pm8008.example.dt.yaml: gpio@c000: compatible: ['qcom,pm8008-gpio'] is too short
> 	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
>  /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/qcom,pm8008.example.dt.yaml: gpio@c000: 'gpio-ranges' is a required property
> 	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> 
>  Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml b/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
> index 7799368..ec3138c 100644
> --- a/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
> +++ b/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
> @@ -53,7 +53,9 @@ patternProperties:
>  
>      properties:
>        compatible:
> -        const: qcom,pm8008-gpio
> +        items:
> +          - const: qcom,pm8008-gpio
> +          - const: qcom,spmi-gpio
>  
>        reg:
>          description: Peripheral address of one of the two GPIO peripherals.
> @@ -61,6 +63,9 @@ patternProperties:
>  
>        gpio-controller: true
>  
> +      gpio-ranges:
> +        maxItems: 1
> +
>        interrupt-controller: true
>  
>        "#interrupt-cells":
> @@ -75,6 +80,7 @@ patternProperties:
>        - gpio-controller
>        - interrupt-controller
>        - "#gpio-cells"
> +      - gpio-ranges
>        - "#interrupt-cells"
>  
>      additionalProperties: false
> @@ -107,10 +113,11 @@ examples:
>          interrupt-parent = <&tlmm>;
>          interrupts = <32 IRQ_TYPE_EDGE_RISING>;
>  
> -        gpio@c000 {
> -          compatible = "qcom,pm8008-gpio";
> +        pm8008_gpios: gpio@c000 {
> +          compatible = "qcom,pm8008-gpio", "qcom,spmi-gpio";
>            reg = <0xc000>;
>            gpio-controller;
> +          gpio-ranges = <&pm8008_gpios 0 0 2>;
>            #gpio-cells = <2>;
>            interrupt-controller;
>            #interrupt-cells = <2>;
> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
> of Code Aurora Forum, hosted by The Linux Foundation
>
Guru Das Srinagesh July 27, 2021, 10:19 p.m. UTC | #3
On Fri, Jul 23, 2021 at 02:01:12PM +0530, satya priya wrote:
> Add gpio-ranges and "qcom,spmi-gpio" compatible to match with the

> parent qcom,pmic-gpio.yaml binding.

> 

> Signed-off-by: satya priya <skakit@codeaurora.org>

> ---

> Changes in V7:

>  - This is newly added in V7 to resolve below error.

>  dtschema/dtc warnings/errors:

>  /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/qcom,pm8008.example.dt.yaml: gpio@c000: compatible: ['qcom,pm8008-gpio'] is too short

> 	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml

>  /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/qcom,pm8008.example.dt.yaml: gpio@c000: 'gpio-ranges' is a required property

> 	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml

> 

>  Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml | 13 ++++++++++---

>  1 file changed, 10 insertions(+), 3 deletions(-)


Reviewed-by: Guru Das Srinagesh <gurus@codeaurora.org>
Lee Jones Aug. 2, 2021, 8:11 a.m. UTC | #4
On Fri, 23 Jul 2021, satya priya wrote:

> Add gpio-ranges and "qcom,spmi-gpio" compatible to match with the
> parent qcom,pmic-gpio.yaml binding.
> 
> Signed-off-by: satya priya <skakit@codeaurora.org>
> ---
> Changes in V7:
>  - This is newly added in V7 to resolve below error.
>  dtschema/dtc warnings/errors:
>  /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/qcom,pm8008.example.dt.yaml: gpio@c000: compatible: ['qcom,pm8008-gpio'] is too short
> 	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
>  /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/qcom,pm8008.example.dt.yaml: gpio@c000: 'gpio-ranges' is a required property
> 	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> 
>  Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)

Applied, thanks.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml b/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
index 7799368..ec3138c 100644
--- a/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
@@ -53,7 +53,9 @@  patternProperties:
 
     properties:
       compatible:
-        const: qcom,pm8008-gpio
+        items:
+          - const: qcom,pm8008-gpio
+          - const: qcom,spmi-gpio
 
       reg:
         description: Peripheral address of one of the two GPIO peripherals.
@@ -61,6 +63,9 @@  patternProperties:
 
       gpio-controller: true
 
+      gpio-ranges:
+        maxItems: 1
+
       interrupt-controller: true
 
       "#interrupt-cells":
@@ -75,6 +80,7 @@  patternProperties:
       - gpio-controller
       - interrupt-controller
       - "#gpio-cells"
+      - gpio-ranges
       - "#interrupt-cells"
 
     additionalProperties: false
@@ -107,10 +113,11 @@  examples:
         interrupt-parent = <&tlmm>;
         interrupts = <32 IRQ_TYPE_EDGE_RISING>;
 
-        gpio@c000 {
-          compatible = "qcom,pm8008-gpio";
+        pm8008_gpios: gpio@c000 {
+          compatible = "qcom,pm8008-gpio", "qcom,spmi-gpio";
           reg = <0xc000>;
           gpio-controller;
+          gpio-ranges = <&pm8008_gpios 0 0 2>;
           #gpio-cells = <2>;
           interrupt-controller;
           #interrupt-cells = <2>;