diff mbox series

[v2,2/5] dt-bindings: mfd: adi,max77541.yaml Add MAX77541 bindings

Message ID 20221226223839.103460-3-okan.sahin@analog.com
State Changes Requested, archived
Headers show
Series None | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dt-meta-schema fail build log

Commit Message

Sahin, Okan Dec. 26, 2022, 10:38 p.m. UTC
The bindings for MAX77541 MFD driver. It also
includes MAX77540 driver whose regmap is covered by MAX77541.

Signed-off-by: Okan Sahin <okan.sahin@analog.com>
---
 .../devicetree/bindings/mfd/adi,max77541.yaml | 102 ++++++++++++++++++
 MAINTAINERS                                   |   1 +
 2 files changed, 103 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/adi,max77541.yaml

Comments

Krzysztof Kozlowski Dec. 27, 2022, 7:53 a.m. UTC | #1
On 26/12/2022 23:38, Okan Sahin wrote:
> The bindings for MAX77541 MFD driver. It also


1. You did not follow entirely my advice here. Read again what I asked
you to fix in commit msg.

2. No improvements in subject - ignored comment.


> includes MAX77540 driver whose regmap is covered by MAX77541.
> 
> Signed-off-by: Okan Sahin <okan.sahin@analog.com>
> ---
>  .../devicetree/bindings/mfd/adi,max77541.yaml | 102 ++++++++++++++++++
>  MAINTAINERS                                   |   1 +
>  2 files changed, 103 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/adi,max77541.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mfd/adi,max77541.yaml b/Documentation/devicetree/bindings/mfd/adi,max77541.yaml
> new file mode 100644
> index 000000000000..50f93cb0bb66
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/adi,max77541.yaml
> @@ -0,0 +1,102 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/adi,max77541.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MAX77540/MAX77541 PMIC from ADI.

Drop tralling full stop.

> +
> +maintainers:
> +  - Okan Sahin <okan.sahin@analog.com>
> +
> +description: |
> +  MAX77540 is a Power Management IC with 2 buck regulators.
> +
> +  MAX77541 is a Power Management IC with 2 buck regulators and 1 ADC.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - adi,max77540
> +      - adi,max77541
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  regulators:
> +    $ref: ../regulator/adi,max77541-regulator.yaml#

Wrong path - it should be full path with /schemas/ just like it was last
time. However such file does not exist, so again as I said - you did not
test this patch. It's non-bisectable patchset. Order it properly. don't
ignore the comments.

> +
> +  adc:
> +    type: object
> +    additionalProperties: false
> +    properties:
> +      compatible:
> +        const: adi,max77541-adc

This is a friendly reminder during the review process.

It seems my previous comments were not fully addressed. Maybe my
feedback got lost between the quotes, maybe you just forgot to apply it.
Please go back to the previous discussion and either implement all
requested changes or keep discussing them.

Thank you.

> +
> +    required:
> +      - compatible
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: adi,max77540
> +    then:
> +      properties:
> +        regulator:
> +          properties:
> +            compatible:
> +              const: adi,max77540-regulator
> +    else:
> +      properties:
> +        regulator:
> +          properties:
> +            compatible:
> +              const: adi,max77541-regulator
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        pmic@69 {
> +            compatible = "adi,max77541";
> +            reg = <0x69>;
> +            interrupt-parent = <&gpio>;
> +            interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
> +
> +            regulators {
> +                BUCK1 {
> +                    regulator-min-microvolt = <500000>;
> +                    regulator-max-microvolt = <5200000>;
> +                    regulator-boot-on;
> +                    regulator-always-on;
> +                };
> +                BUCK2 {
> +                    regulator-min-microvolt = <500000>;
> +                    regulator-max-microvolt = <5200000>;
> +                    regulator-boot-on;
> +                    regulator-always-on;
> +                };
> +            };
> +
> +            adc {
> +                compatible = "adi,max77541-adc";
> +            };
> +        };
> +    };
> +

Stray new line. Drop it.

Best regards,
Krzysztof
Rob Herring (Arm) Dec. 28, 2022, 12:27 a.m. UTC | #2
On Tue, 27 Dec 2022 01:38:36 +0300, Okan Sahin wrote:
> The bindings for MAX77541 MFD driver. It also
> includes MAX77540 driver whose regmap is covered by MAX77541.
> 
> Signed-off-by: Okan Sahin <okan.sahin@analog.com>
> ---
>  .../devicetree/bindings/mfd/adi,max77541.yaml | 102 ++++++++++++++++++
>  MAINTAINERS                                   |   1 +
>  2 files changed, 103 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/adi,max77541.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/mfd/adi,max77541.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/regulator/adi,max77541-regulator.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/adi,max77541.example.dtb: pmic@69: regulators: False schema does not allow {'BUCK1': {'regulator-min-microvolt': [[500000]], 'regulator-max-microvolt': [[5200000]], 'regulator-boot-on': True, 'regulator-always-on': True}, 'BUCK2': {'regulator-min-microvolt': [[500000]], 'regulator-max-microvolt': [[5200000]], 'regulator-boot-on': True, 'regulator-always-on': True}}
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/adi,max77541.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221226223839.103460-3-okan.sahin@analog.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Sahin, Okan Jan. 15, 2023, 5:40 p.m. UTC | #3
Hi Krzysztof,

Thank you for your feedback and efforts. I apologize for some missing points of v2 patch. I tried to do my best. I will be more careful to fix all feedback before sending new patch so I want to ask a few things before sending v3 patch

On Tue, 27 Dec 2022 10:54 AM
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 26/12/2022 23:38, Okan Sahin wrote:
> > The bindings for MAX77541 MFD driver. It also
> 
> 
> 1. You did not follow entirely my advice here. Read again what I asked you to fix
> in commit msg.
> 
> 2. No improvements in subject - ignored comment.
> 
> 
> > includes MAX77540 driver whose regmap is covered by MAX77541.
> >
> > Signed-off-by: Okan Sahin <okan.sahin@analog.com>
> > ---
> >  .../devicetree/bindings/mfd/adi,max77541.yaml | 102 ++++++++++++++++++
> >  MAINTAINERS                                   |   1 +
> >  2 files changed, 103 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/mfd/adi,max77541.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/mfd/adi,max77541.yaml
> > b/Documentation/devicetree/bindings/mfd/adi,max77541.yaml
> > new file mode 100644
> > index 000000000000..50f93cb0bb66
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mfd/adi,max77541.yaml
> > @@ -0,0 +1,102 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2
> > +---
> > +$id:
> > +https://urldefense.com/v3/__http://devicetree.org/schemas/mfd/adi,max
> >
> +77541.yaml*__;Iw!!A3Ni8CS0y2Y!5i9A0O1bNDHqRib46J285KCGbVLbqULqRRa
> 153Q
> > +XIaclV3BEUrMbK0XAuXk3meed6XG3y7HigRu81P9dqjnUsb9S3g2t$
> > +$schema:
> > +https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.y
> >
> +aml*__;Iw!!A3Ni8CS0y2Y!5i9A0O1bNDHqRib46J285KCGbVLbqULqRRa153QXIa
> clV3
> > +BEUrMbK0XAuXk3meed6XG3y7HigRu81P9dqjnUsRlxWY6o$
> > +
> > +title: MAX77540/MAX77541 PMIC from ADI.
> 
> Drop tralling full stop.
> 
> > +
> > +maintainers:
> > +  - Okan Sahin <okan.sahin@analog.com>
> > +
> > +description: |
> > +  MAX77540 is a Power Management IC with 2 buck regulators.
> > +
> > +  MAX77541 is a Power Management IC with 2 buck regulators and 1 ADC.
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - adi,max77540
> > +      - adi,max77541
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  regulators:
> > +    $ref: ../regulator/adi,max77541-regulator.yaml#
> 
> Wrong path - it should be full path with /schemas/ just like it was last time.
> However such file does not exist, so again as I said - you did not test this patch.
> It's non-bisectable patchset. Order it properly. don't ignore the comments.
> 
> > +
> > +  adc:
> > +    type: object
> > +    additionalProperties: false
> > +    properties:
> > +      compatible:
> > +        const: adi,max77541-adc
> 
> This is a friendly reminder during the review process.
> 
> It seems my previous comments were not fully addressed. Maybe my feedback
> got lost between the quotes, maybe you just forgot to apply it.
> Please go back to the previous discussion and either implement all requested
> changes or keep discussing them.
> 
> Thank you.
Honestly, I don't quite understand what you're suggesting regarding the adc part. I thought I should add the adc as an object since it is in the mfd device. Do I need to remove this part?
> 
> > +
> > +    required:
> > +      - compatible
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts
> > +
> > +allOf:
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: adi,max77540
> > +    then:
> > +      properties:
> > +        regulator:
> > +          properties:
> > +            compatible:
> > +              const: adi,max77540-regulator
> > +    else:
> > +      properties:
> > +        regulator:
> > +          properties:
> > +            compatible:
> > +              const: adi,max77541-regulator
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> > +
> > +    i2c {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        pmic@69 {
> > +            compatible = "adi,max77541";
> > +            reg = <0x69>;
> > +            interrupt-parent = <&gpio>;
> > +            interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
> > +
> > +            regulators {
> > +                BUCK1 {
> > +                    regulator-min-microvolt = <500000>;
> > +                    regulator-max-microvolt = <5200000>;
> > +                    regulator-boot-on;
> > +                    regulator-always-on;
> > +                };
> > +                BUCK2 {
> > +                    regulator-min-microvolt = <500000>;
> > +                    regulator-max-microvolt = <5200000>;
> > +                    regulator-boot-on;
> > +                    regulator-always-on;
> > +                };
> > +            };
> > +
> > +            adc {
> > +                compatible = "adi,max77541-adc";
> > +            };
> > +        };
> > +    };
> > +
> 
> Stray new line. Drop it.
> 
> Best regards,
> Krzysztof
Best regards,
Okan
Krzysztof Kozlowski Jan. 15, 2023, 7:16 p.m. UTC | #4
On 15/01/2023 18:40, Sahin, Okan wrote:
> Hi Krzysztof,
> 
> Thank you for your feedback and efforts. I apologize for some missing points of v2 patch. I tried to do my best. I will be more careful to fix all feedback before sending new patch so I want to ask a few things before sending v3 patch

Please wrap lines in your email.

(...)

>>> +
>>> +  adc:
>>> +    type: object
>>> +    additionalProperties: false
>>> +    properties:
>>> +      compatible:
>>> +        const: adi,max77541-adc
>>
>> This is a friendly reminder during the review process.
>>
>> It seems my previous comments were not fully addressed. Maybe my feedback
>> got lost between the quotes, maybe you just forgot to apply it.
>> Please go back to the previous discussion and either implement all requested
>> changes or keep discussing them.
>>
>> Thank you.
> Honestly, I don't quite understand what you're suggesting regarding the adc part. I thought I should add the adc as an object since it is in the mfd device. Do I need to remove this part?

What is unclear in my comment from v1? Yes, you need to remove it
because it useless. There is no need for a node consisting of only
compatible. Your driver does not need the DT node at all to do its job.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/adi,max77541.yaml b/Documentation/devicetree/bindings/mfd/adi,max77541.yaml
new file mode 100644
index 000000000000..50f93cb0bb66
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/adi,max77541.yaml
@@ -0,0 +1,102 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/adi,max77541.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MAX77540/MAX77541 PMIC from ADI.
+
+maintainers:
+  - Okan Sahin <okan.sahin@analog.com>
+
+description: |
+  MAX77540 is a Power Management IC with 2 buck regulators.
+
+  MAX77541 is a Power Management IC with 2 buck regulators and 1 ADC.
+
+properties:
+  compatible:
+    enum:
+      - adi,max77540
+      - adi,max77541
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  regulators:
+    $ref: ../regulator/adi,max77541-regulator.yaml#
+
+  adc:
+    type: object
+    additionalProperties: false
+    properties:
+      compatible:
+        const: adi,max77541-adc
+
+    required:
+      - compatible
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: adi,max77540
+    then:
+      properties:
+        regulator:
+          properties:
+            compatible:
+              const: adi,max77540-regulator
+    else:
+      properties:
+        regulator:
+          properties:
+            compatible:
+              const: adi,max77541-regulator
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        pmic@69 {
+            compatible = "adi,max77541";
+            reg = <0x69>;
+            interrupt-parent = <&gpio>;
+            interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
+
+            regulators {
+                BUCK1 {
+                    regulator-min-microvolt = <500000>;
+                    regulator-max-microvolt = <5200000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+                BUCK2 {
+                    regulator-min-microvolt = <500000>;
+                    regulator-max-microvolt = <5200000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+            };
+
+            adc {
+                compatible = "adi,max77541-adc";
+            };
+        };
+    };
+
diff --git a/MAINTAINERS b/MAINTAINERS
index af94d06bb9f0..22f5a9c490e3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12501,6 +12501,7 @@  MAXIM MAX77541 PMIC MFD DRIVER
 M:	Okan Sahin <okan.sahin@analog.com>
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
+F:	Documentation/devicetree/bindings/mfd/adi,max77541.yaml
 F:	drivers/mfd/max77541.c
 F:	include/linux/mfd/max77541.h