diff mbox series

[v1,1/3] dt-bindings: hwmon/pmbus: Add mps,mpq7932 power-management IC

Message ID 20221126171711.1078309-1-saravanan@linumiz.com (mailing list archive)
State Changes Requested
Headers show
Series [v1,1/3] dt-bindings: hwmon/pmbus: Add mps,mpq7932 power-management IC | expand

Commit Message

Saravanan Sekar Nov. 26, 2022, 5:17 p.m. UTC
Add bindings for mps,mpq7932 power-management IC

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
---
 .../bindings/hwmon/pmbus/mps,mpq7932.yaml     | 69 +++++++++++++++++++
 1 file changed, 69 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq7932.yaml

Comments

Krzysztof Kozlowski Nov. 27, 2022, 12:38 p.m. UTC | #1
On 26/11/2022 18:17, Saravanan Sekar wrote:
> Add bindings for mps,mpq7932 power-management IC
> 
> Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
> ---
>  .../bindings/hwmon/pmbus/mps,mpq7932.yaml     | 69 +++++++++++++++++++

Use subject prefixes matching the subsystem (git log --oneline -- ...).

>  1 file changed, 69 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq7932.yaml
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq7932.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq7932.yaml
> new file mode 100644
> index 000000000000..6ec072c287a3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq7932.yaml
> @@ -0,0 +1,69 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/mps,mpq7932.yaml#

Does not look like you tested the bindings. Please run `make
dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).

> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Monolithic Power System MPQ7932 PMIC
> +
> +maintainers:
> +  - Saravanan Sekar <saravanan@linumiz.com>
> +
> +properties:
> +  $nodename:
> +    pattern: "pmic@[0-9a-f]{1,2}"

Why requiring nodename? Device schemas usually don't do that.

> +  compatible:
> +    enum:
> +      - mps,mpq7932
> +
> +  reg:
> +    maxItems: 1
> +
> +  regulators:
> +    type: object
> +    $ref: regulator.yaml#

regulators node is a regulator with one more regulator? Drop.

> +
> +    description: |
> +      list of regulators provided by this controller, must be named
> +      after their hardware counterparts BUCK[1-6]
> +
> +      "^buck[1-6]$":
> +        type: object
> +        $ref: regulator.yaml#
> +

Drop blank line.

> +        unevaluatedProperties: false
> +
> +    additionalProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - regulators
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        pmic@69 {
> +          compatible = "mps,mpq7932";

Messed indentation. Use same for entire example, e.g. 4-spaces.

> +          reg = <0x69>;
> +
> +          regulators {
> +

Drop blank line.

> +            buck1 {
> +             regulator-name = "buck1";
> +             regulator-min-microvolt = <400000>;
> +             regulator-max-microvolt = <3587500>;
> +             regulator-min-microamp  = <460000>;
> +             regulator-max-microamp  = <7600000>;
> +             regulator-boot-on;
> +            };
> +

Why blank line here? Drop it.

> +         };
> +       };
> +     };
> +...

Best regards,
Krzysztof
Krzysztof Kozlowski Nov. 27, 2022, 12:39 p.m. UTC | #2
On 26/11/2022 18:17, Saravanan Sekar wrote:
> Add bindings for mps,mpq7932 power-management IC
> 
> Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
> ---

Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC.  It might happen, that command when run on an older
kernel, gives you outdated entries.  Therefore please be sure you base
your patches on recent Linux kernel.

Skipping lists to cc skips the tests. That's a no. Especially that you
did not test it yourself...

Best regards,
Krzysztof
Rob Herring Nov. 27, 2022, 5:53 p.m. UTC | #3
On Sat, Nov 26, 2022 at 11:17 AM Saravanan Sekar <saravanan@linumiz.com> wrote:
>
> Add bindings for mps,mpq7932 power-management IC
>
> Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
> ---
>  .../bindings/hwmon/pmbus/mps,mpq7932.yaml     | 69 +++++++++++++++++++
>  1 file changed, 69 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq7932.yaml

Use get_maintainers.pl and send patches to the right lists. DT list is
missing so no checks run and it's not in the review queue (Patchwork).

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq7932.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq7932.yaml
new file mode 100644
index 000000000000..6ec072c287a3
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq7932.yaml
@@ -0,0 +1,69 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/mps,mpq7932.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Monolithic Power System MPQ7932 PMIC
+
+maintainers:
+  - Saravanan Sekar <saravanan@linumiz.com>
+
+properties:
+  $nodename:
+    pattern: "pmic@[0-9a-f]{1,2}"
+  compatible:
+    enum:
+      - mps,mpq7932
+
+  reg:
+    maxItems: 1
+
+  regulators:
+    type: object
+    $ref: regulator.yaml#
+
+    description: |
+      list of regulators provided by this controller, must be named
+      after their hardware counterparts BUCK[1-6]
+
+      "^buck[1-6]$":
+        type: object
+        $ref: regulator.yaml#
+
+        unevaluatedProperties: false
+
+    additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - regulators
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        pmic@69 {
+          compatible = "mps,mpq7932";
+          reg = <0x69>;
+
+          regulators {
+
+            buck1 {
+             regulator-name = "buck1";
+             regulator-min-microvolt = <400000>;
+             regulator-max-microvolt = <3587500>;
+             regulator-min-microamp  = <460000>;
+             regulator-max-microamp  = <7600000>;
+             regulator-boot-on;
+            };
+
+         };
+       };
+     };
+...