diff mbox series

[3/6] devicetree/bindings: Initial commit of silergy,sy7636a-regulator.yaml

Message ID 20210117042539.1609-3-alistair@alistair23.me
State Changes Requested, archived
Headers show
Series [1/6] devicetree/bindings: Initial commit of silergy,sy7636a.yaml | expand

Checks

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

Commit Message

Alistair Francis Jan. 17, 2021, 4:25 a.m. UTC
Initial support for the Silergy SY7636A-regulator Power Management chip
driver.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
 .../bindings/regulator/silergy,sy7636a.yaml   | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/silergy,sy7636a.yaml

Comments

Mark Brown Jan. 18, 2021, 12:35 p.m. UTC | #1
On Sat, Jan 16, 2021 at 08:25:36PM -0800, Alistair Francis wrote:
> Initial support for the Silergy SY7636A-regulator Power Management chip
> driver.

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.

> +properties:
> +  compatible:
> +    enum:
> +      - sy7636a-regulator

Compatible strings should be in the form vendor,device.  

> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        regulator@60 {
> +          compatible = "sy7636a-regulator";
> +          reg_epdpmic: vcom {
> +            regulator-name = "vcom";
> +            regulator-boot-on;
> +          };
> +        };
> +    };

There's no documentation of VCOM as a valid regulator in the binding.
Mark Brown Jan. 18, 2021, 12:42 p.m. UTC | #2
On Mon, Jan 18, 2021 at 12:35:19PM +0000, Mark Brown wrote:
> On Sat, Jan 16, 2021 at 08:25:36PM -0800, Alistair Francis wrote:

> > +properties:
> > +  compatible:
> > +    enum:
> > +      - sy7636a-regulator

> Compatible strings should be in the form vendor,device.  

You should not have separate binding documents for MFD subfunctions that
don't have separate compatible strings in DT, include the documentation
for the properties used by those subfunctions in the main MFD binding
document.
Rob Herring Jan. 18, 2021, 3:47 p.m. UTC | #3
On Sat, 16 Jan 2021 20:25:36 -0800, Alistair Francis wrote:
> Initial support for the Silergy SY7636A-regulator Power Management chip
> driver.
> 
> Signed-off-by: Alistair Francis <alistair@alistair23.me>
> ---
>  .../bindings/regulator/silergy,sy7636a.yaml   | 39 +++++++++++++++++++
>  1 file changed, 39 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/regulator/silergy,sy7636a.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/regulator/silergy,sy7636a.yaml: $id: relative path/filename doesn't match actual path or filename
	expected: http://devicetree.org/schemas/regulator/silergy,sy7636a.yaml#
Documentation/devicetree/bindings/regulator/silergy,sy7636a.example.dts:22.26-28.15: Warning (unit_address_vs_reg): /example-0/i2c/regulator@60: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/regulator/silergy,sy7636a.example.dts:22.26-28.15: Warning (i2c_bus_reg): /example-0/i2c/regulator@60: missing or empty reg property

See https://patchwork.ozlabs.org/patch/1427907

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

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.
Alistair Francis Jan. 22, 2021, 5:05 a.m. UTC | #4
On Mon, Jan 18, 2021 at 4:42 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Mon, Jan 18, 2021 at 12:35:19PM +0000, Mark Brown wrote:
> > On Sat, Jan 16, 2021 at 08:25:36PM -0800, Alistair Francis wrote:
>
> > > +properties:
> > > +  compatible:
> > > +    enum:
> > > +      - sy7636a-regulator
>
> > Compatible strings should be in the form vendor,device.
>
> You should not have separate binding documents for MFD subfunctions that
> don't have separate compatible strings in DT, include the documentation
> for the properties used by those subfunctions in the main MFD binding
> document.

Thanks for the review. I have updated the patch and will send a v2.

Alistair
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/regulator/silergy,sy7636a.yaml b/Documentation/devicetree/bindings/regulator/silergy,sy7636a.yaml
new file mode 100644
index 000000000000..d88c4ab1be02
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/silergy,sy7636a.yaml
@@ -0,0 +1,39 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/silergy,sy7636a-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: silergy sy7636a PMIC
+
+maintainers:
+  - Alistair Francis <alistair@alistair23.me>
+
+allOf:
+  - $ref: regulator.yaml#
+
+properties:
+  compatible:
+    enum:
+      - sy7636a-regulator
+
+required:
+  - compatible
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        regulator@60 {
+          compatible = "sy7636a-regulator";
+          reg_epdpmic: vcom {
+            regulator-name = "vcom";
+            regulator-boot-on;
+          };
+        };
+    };
+
+...