diff mbox series

[2/2] usb typec: tcpci: mt6360: Add vbus supply into dt-binding description

Message ID 1610720001-15300-2-git-send-email-u0084500@gmail.com
State New
Headers show
Series [1/2] usb typec: tcpci: mt6360: Add vsafe0v support and external vbus supply control | expand

Commit Message

cy_huang Jan. 15, 2021, 2:13 p.m. UTC
From: ChiYuan Huang <cy_huang@richtek.com>

Add external vbus source into dt-binding description.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
---
 Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Rob Herring (Arm) Jan. 17, 2021, 3:45 p.m. UTC | #1
On Fri, 15 Jan 2021 22:13:21 +0800, cy_huang wrote:
> From: ChiYuan Huang <cy_huang@richtek.com>

> 

> Add external vbus source into dt-binding description.

> 

> Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>

> ---

>  Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml | 7 +++++++

>  1 file changed, 7 insertions(+)

> 


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

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml: properties:vbus-supply: 'maxItems' is not one of ['description', 'deprecated']
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml: ignoring, error in schema: properties: vbus-supply
warning: no schema found in file: ./Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml

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

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.
cy_huang Jan. 18, 2021, 8:33 a.m. UTC | #2
Rob Herring <robh@kernel.org> 於 2021年1月17日 週日 下午11:46寫道:
>
> On Fri, 15 Jan 2021 22:13:21 +0800, cy_huang wrote:
> > From: ChiYuan Huang <cy_huang@richtek.com>
> >
> > Add external vbus source into dt-binding description.
> >
> > Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
> > ---
> >  Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml: properties:vbus-supply: 'maxItems' is not one of ['description', 'deprecated']
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml: ignoring, error in schema: properties: vbus-supply
> warning: no schema found in file: ./Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
>
> See https://patchwork.ozlabs.org/patch/1427073
>
> 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.
>
Thanks, after I re-installed the yamlint, the error can be seen.
Refer to https://www.kernel.org/doc/Documentation/devicetree/bindings/example-schema.yaml
*-supply is only a phandle

In next series patch, I'll remove the maxItems in vbus-supply.
I already checked the below change. make dt_binding_check can be passed

   vbus-supply:
     description:
       Vbus source supply regulator.
-    maxItems: 1

   connector:
     type: object
Rob Herring (Arm) Jan. 19, 2021, 11:10 p.m. UTC | #3
On Fri, Jan 15, 2021 at 10:13:21PM +0800, cy_huang wrote:
> From: ChiYuan Huang <cy_huang@richtek.com>
> 
> Add external vbus source into dt-binding description.
> 
> Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
> ---
>  Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml b/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
> index 1e8e1c2..b8d842b 100644
> --- a/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
> +++ b/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
> @@ -26,6 +26,11 @@ properties:
>      items:
>        - const: PD_IRQB
>  
> +  vbus-supply:
> +    description:
> +      Vbus source supply regulator.
> +    maxItems: 1

vbus-supply is already in the 'connector' node, you don't need it here.

> +
>    connector:
>      type: object
>      $ref: ../connector/usb-connector.yaml#
> @@ -38,6 +43,7 @@ required:
>    - compatible
>    - interrupts
>    - interrupt-names
> +  - vbus-supply
>  
>  examples:
>    - |
> @@ -54,6 +60,7 @@ examples:
>            compatible = "mediatek,mt6360-tcpc";
>            interrupts-extended = <&gpio26 3 IRQ_TYPE_LEVEL_LOW>;
>            interrupt-names = "PD_IRQB";
> +          vbus-supply = <&otg_vbus>;
>  
>            connector {
>              compatible = "usb-c-connector";
> -- 
> 2.7.4
>
cy_huang Jan. 20, 2021, 1:50 a.m. UTC | #4
Rob Herring <robh@kernel.org> 於 2021年1月20日 週三 上午7:11寫道:
>
> On Fri, Jan 15, 2021 at 10:13:21PM +0800, cy_huang wrote:
> > From: ChiYuan Huang <cy_huang@richtek.com>
> >
> > Add external vbus source into dt-binding description.
> >
> > Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
> > ---
> >  Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml b/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
> > index 1e8e1c2..b8d842b 100644
> > --- a/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
> > +++ b/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
> > @@ -26,6 +26,11 @@ properties:
> >      items:
> >        - const: PD_IRQB
> >
> > +  vbus-supply:
> > +    description:
> > +      Vbus source supply regulator.
> > +    maxItems: 1
>
> vbus-supply is already in the 'connector' node, you don't need it here.
>
If not put here, 'regulator_get' only can follow the legacy way to get
vbus regulator.
Currently, there's no one to use the 'vbus-supply' property.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml b/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
index 1e8e1c2..b8d842b 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
+++ b/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
@@ -26,6 +26,11 @@  properties:
     items:
       - const: PD_IRQB
 
+  vbus-supply:
+    description:
+      Vbus source supply regulator.
+    maxItems: 1
+
   connector:
     type: object
     $ref: ../connector/usb-connector.yaml#
@@ -38,6 +43,7 @@  required:
   - compatible
   - interrupts
   - interrupt-names
+  - vbus-supply
 
 examples:
   - |
@@ -54,6 +60,7 @@  examples:
           compatible = "mediatek,mt6360-tcpc";
           interrupts-extended = <&gpio26 3 IRQ_TYPE_LEVEL_LOW>;
           interrupt-names = "PD_IRQB";
+          vbus-supply = <&otg_vbus>;
 
           connector {
             compatible = "usb-c-connector";