diff mbox series

[v4,2/3] bindings: pm8941-misc: Add support for VBUS detection

Message ID 6c6bd3601ec8f4c68f581452fca3ef96f2ae94f9.1603869292.git.gurus@codeaurora.org
State Changes Requested
Headers show
Series Add support for VBUS detection | expand

Checks

Context Check Description
robh/dt-meta-schema success
robh/checkpatch success

Commit Message

Guru Das Srinagesh Oct. 28, 2020, 7:18 a.m. UTC
Add compatible string that adds support for reporting VBUS detection
status that can be detected via a dedicated PMIC pin.

Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
---
 Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Rob Herring Oct. 30, 2020, 1:36 p.m. UTC | #1
On Wed, Oct 28, 2020 at 12:18:53AM -0700, Guru Das Srinagesh wrote:
> Add compatible string that adds support for reporting VBUS detection
> status that can be detected via a dedicated PMIC pin.
> 
> Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
> Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
> ---
>  Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
> index e8eea83..15e3749 100644
> --- a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
> +++ b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
> @@ -15,18 +15,23 @@ description: |
>  
>  properties:
>    compatible:
> +    minItems: 1
>      items:
>        - const: qcom,pm8941-misc
> +      - const: qcom,pmd-vbus-det

Do you really need another compatible here? Just detect this by having a 
2nd interrupt.

>  
>    reg:
>      maxItems: 1
>  
>    interrupts:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 2
>  
>    interrupt-names:
> +    minItems: 1
>      items:
>        - const: usb_id
> +      - const: usb_vbus
>  
>  required:
>    - compatible
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
Guru Das Srinagesh Oct. 30, 2020, 11:37 p.m. UTC | #2
On Fri, Oct 30, 2020 at 08:36:12AM -0500, Rob Herring wrote:
> On Wed, Oct 28, 2020 at 12:18:53AM -0700, Guru Das Srinagesh wrote:
> > Add compatible string that adds support for reporting VBUS detection
> > status that can be detected via a dedicated PMIC pin.
> > 
> > Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
> > Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
> > ---
> >  Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
> > index e8eea83..15e3749 100644
> > --- a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
> > +++ b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
> > @@ -15,18 +15,23 @@ description: |
> >  
> >  properties:
> >    compatible:
> > +    minItems: 1
> >      items:
> >        - const: qcom,pm8941-misc
> > +      - const: qcom,pmd-vbus-det
> 
> Do you really need another compatible here? Just detect this by having a 
> 2nd interrupt.

Agreed; will drop this bit in the next patchset.

> 
> >  
> >    reg:
> >      maxItems: 1
> >  
> >    interrupts:
> > -    maxItems: 1
> > +    minItems: 1
> > +    maxItems: 2
> >  
> >    interrupt-names:
> > +    minItems: 1
> >      items:
> >        - const: usb_id
> > +      - const: usb_vbus
> >  
> >  required:
> >    - compatible
> > -- 
> > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> > a Linux Foundation Collaborative Project
> >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
index e8eea83..15e3749 100644
--- a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
+++ b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.yaml
@@ -15,18 +15,23 @@  description: |
 
 properties:
   compatible:
+    minItems: 1
     items:
       - const: qcom,pm8941-misc
+      - const: qcom,pmd-vbus-det
 
   reg:
     maxItems: 1
 
   interrupts:
-    maxItems: 1
+    minItems: 1
+    maxItems: 2
 
   interrupt-names:
+    minItems: 1
     items:
       - const: usb_id
+      - const: usb_vbus
 
 required:
   - compatible