diff mbox series

[v3,1/4] dt-bindings: power: reset: qcom-pon: define pm8941-pon

Message ID 20230531014248.3824043-2-dmitry.baryshkov@linaro.org
State Not Applicable, archived
Headers show
Series ARM: dts: qcom: apq8074-dragonboard: enable resin device | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Dmitry Baryshkov May 31, 2023, 1:42 a.m. UTC
On PM8941 pon doesn't store the reset reason. However we still need the
wrapping node for pwrkey and resin nodes. Add bindings for pm8941-pon
device.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../devicetree/bindings/power/reset/qcom,pon.yaml    | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski May 31, 2023, 6:59 p.m. UTC | #1
On 31/05/2023 03:42, Dmitry Baryshkov wrote:
> On PM8941 pon doesn't store the reset reason. However we still need the
> wrapping node for pwrkey and resin nodes. Add bindings for pm8941-pon
> device.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../devicetree/bindings/power/reset/qcom,pon.yaml    | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
> index d96170eecbd2..eb3c88e501ef 100644
> --- a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
> +++ b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
> @@ -19,6 +19,7 @@ properties:
>    compatible:
>      enum:
>        - qcom,pm8916-pon
> +      - qcom,pm8941-pon
>        - qcom,pms405-pon
>        - qcom,pm8998-pon
>        - qcom,pmk8350-pon
> @@ -56,13 +57,22 @@ required:
>  unevaluatedProperties: false
>  
>  allOf:
> -  - $ref: reboot-mode.yaml#
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            contains:
> +              const: qcom,pm8941-pon
> +    then:
> +      $ref: reboot-mode.yaml#

Are you sure that this works, so pm8941 does not allow mode-*
properties? I am afraid they would still be considered evaluated, thus
your if-not is not effective.

Best regards,
Krzysztof
Dmitry Baryshkov June 1, 2023, 12:28 a.m. UTC | #2
On Wed, 31 May 2023 at 21:59, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 31/05/2023 03:42, Dmitry Baryshkov wrote:
> > On PM8941 pon doesn't store the reset reason. However we still need the
> > wrapping node for pwrkey and resin nodes. Add bindings for pm8941-pon
> > device.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >  .../devicetree/bindings/power/reset/qcom,pon.yaml    | 12 +++++++++++-
> >  1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
> > index d96170eecbd2..eb3c88e501ef 100644
> > --- a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
> > +++ b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
> > @@ -19,6 +19,7 @@ properties:
> >    compatible:
> >      enum:
> >        - qcom,pm8916-pon
> > +      - qcom,pm8941-pon
> >        - qcom,pms405-pon
> >        - qcom,pm8998-pon
> >        - qcom,pmk8350-pon
> > @@ -56,13 +57,22 @@ required:
> >  unevaluatedProperties: false
> >
> >  allOf:
> > -  - $ref: reboot-mode.yaml#
> > +  - if:
> > +      not:
> > +        properties:
> > +          compatible:
> > +            contains:
> > +              const: qcom,pm8941-pon
> > +    then:
> > +      $ref: reboot-mode.yaml#
>
> Are you sure that this works, so pm8941 does not allow mode-*
> properties? I am afraid they would still be considered evaluated, thus
> your if-not is not effective.

Yes, I checked that they trigger the schema validation error. If you'd
prefer I can extend this 'if' with explicit 'mode-*: false'.
Rob Herring June 8, 2023, 3:59 p.m. UTC | #3
On Wed, 31 May 2023 04:42:45 +0300, Dmitry Baryshkov wrote:
> On PM8941 pon doesn't store the reset reason. However we still need the
> wrapping node for pwrkey and resin nodes. Add bindings for pm8941-pon
> device.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../devicetree/bindings/power/reset/qcom,pon.yaml    | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 

Acked-by: Rob Herring <robh@kernel.org>
Sebastian Reichel June 8, 2023, 9:53 p.m. UTC | #4
Hi,

On Wed, May 31, 2023 at 04:42:45AM +0300, Dmitry Baryshkov wrote:
> On PM8941 pon doesn't store the reset reason. However we still need the
> wrapping node for pwrkey and resin nodes. Add bindings for pm8941-pon
> device.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---

Does not apply, please rebase.

-- Sebastian

>  .../devicetree/bindings/power/reset/qcom,pon.yaml    | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
> index d96170eecbd2..eb3c88e501ef 100644
> --- a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
> +++ b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
> @@ -19,6 +19,7 @@ properties:
>    compatible:
>      enum:
>        - qcom,pm8916-pon
> +      - qcom,pm8941-pon
>        - qcom,pms405-pon
>        - qcom,pm8998-pon
>        - qcom,pmk8350-pon
> @@ -56,13 +57,22 @@ required:
>  unevaluatedProperties: false
>  
>  allOf:
> -  - $ref: reboot-mode.yaml#
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            contains:
> +              const: qcom,pm8941-pon
> +    then:
> +      $ref: reboot-mode.yaml#
> +
>    - if:
>        properties:
>          compatible:
>            contains:
>              enum:
>                - qcom,pm8916-pon
> +              - qcom,pm8941-pon
>                - qcom,pms405-pon
>                - qcom,pm8998-pon
>      then:
> -- 
> 2.39.2
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
index d96170eecbd2..eb3c88e501ef 100644
--- a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
+++ b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
@@ -19,6 +19,7 @@  properties:
   compatible:
     enum:
       - qcom,pm8916-pon
+      - qcom,pm8941-pon
       - qcom,pms405-pon
       - qcom,pm8998-pon
       - qcom,pmk8350-pon
@@ -56,13 +57,22 @@  required:
 unevaluatedProperties: false
 
 allOf:
-  - $ref: reboot-mode.yaml#
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              const: qcom,pm8941-pon
+    then:
+      $ref: reboot-mode.yaml#
+
   - if:
       properties:
         compatible:
           contains:
             enum:
               - qcom,pm8916-pon
+              - qcom,pm8941-pon
               - qcom,pms405-pon
               - qcom,pm8998-pon
     then: