diff mbox series

[v3,6/6] dt-bindings: pwm: Add compatible for MediaTek MT8186

Message ID 1646199106-26879-7-git-send-email-xinlei.lee@mediatek.com (mailing list archive)
State New, archived
Headers show
Series Convert pwm-mtk-disp.txt to | expand

Commit Message

Xinlei Lee (李昕磊) March 2, 2022, 5:31 a.m. UTC
From: Xinlei Lee <xinlei.lee@mediatek.com>

Add dt-binding documentation of pwm for MediaTek MT8186 SoC.

Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>
---
 Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3 +++
 1 file changed, 3 insertions(+)

Comments

AngeloGioacchino Del Regno March 2, 2022, 2:14 p.m. UTC | #1
Il 02/03/22 06:31, xinlei.lee@mediatek.com ha scritto:
> From: Xinlei Lee <xinlei.lee@mediatek.com>
> 
> Add dt-binding documentation of pwm for MediaTek MT8186 SoC.
> 
> Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>
> ---
>   Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> index 3a5d1cfed94d..053805846cfe 100644
> --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> @@ -21,6 +21,9 @@ properties:
>             - mediatek,mt6595-disp-pwm
>             - mediatek,mt8173-disp-pwm
>             - mediatek,mt8183-disp-pwm
> +      - items:
> +          - const: mediatek,mt8186-disp-pwm
> +          - const: mediatek,mt8183-disp-pwm
>         - items:
>             - const: mediatek,mt8192-disp-pwm
>             - const: mediatek,mt8183-disp-pwm
> 


Hello Xinlei,

even though repeating these items may not give you errors, this is not really
the best way to do this.
I've done something similar here:
https://lore.kernel.org/linux-arm-kernel/20220217095242.13761-1-angelogioacchino.delregno@collabora.com/

So, for the compatibles needing mediatek,mt8183-disp-pwm it should be looking
similar to this:

- items:
     - enum:
         - mediatek,mt8186-disp-pwm
         - mediatek,mt8192-disp-pwm
         - mediatek,mt8195-disp-pwm
     - const: mediatek,mt8183-disp-pwm

Regards,
Angelo
Rob Herring (Arm) March 2, 2022, 5:55 p.m. UTC | #2
On Wed, Mar 02, 2022 at 01:31:46PM +0800, xinlei.lee@mediatek.com wrote:
> From: Xinlei Lee <xinlei.lee@mediatek.com>
> 
> Add dt-binding documentation of pwm for MediaTek MT8186 SoC.
> 
> Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>
> ---
>  Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> index 3a5d1cfed94d..053805846cfe 100644
> --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> @@ -21,6 +21,9 @@ properties:
>            - mediatek,mt6595-disp-pwm
>            - mediatek,mt8173-disp-pwm
>            - mediatek,mt8183-disp-pwm
> +      - items:
> +          - const: mediatek,mt8186-disp-pwm
> +          - const: mediatek,mt8183-disp-pwm

Combine to 1 entry:

>        - items:
>            - const: mediatek,mt8192-disp-pwm

enum:
  - mediatek,mt8186-disp-pwm
  - mediatek,mt8192-disp-pwm

>            - const: mediatek,mt8183-disp-pwm
> -- 
> 2.18.0
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Xinlei Lee (李昕磊) March 3, 2022, 2:05 a.m. UTC | #3
On Wed, 2022-03-02 at 11:55 -0600, Rob Herring wrote:
> On Wed, Mar 02, 2022 at 01:31:46PM +0800, xinlei.lee@mediatek.com
> wrote:
> > From: Xinlei Lee <xinlei.lee@mediatek.com>
> > 
> > Add dt-binding documentation of pwm for MediaTek MT8186 SoC.
> > 
> > Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>
> > ---
> >  Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3
> > +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-
> > disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-
> > disp.yaml
> > index 3a5d1cfed94d..053805846cfe 100644
> > --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> > +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> > @@ -21,6 +21,9 @@ properties:
> >            - mediatek,mt6595-disp-pwm
> >            - mediatek,mt8173-disp-pwm
> >            - mediatek,mt8183-disp-pwm
> > +      - items:
> > +          - const: mediatek,mt8186-disp-pwm
> > +          - const: mediatek,mt8183-disp-pwm
> 
> Combine to 1 entry:
> 
> >        - items:
> >            - const: mediatek,mt8192-disp-pwm
> 
> enum:
>   - mediatek,mt8186-disp-pwm
>   - mediatek,mt8192-disp-pwm
> 
> >            - const: mediatek,mt8183-disp-pwm
> > -- 
> > 2.18.0
> > 
> > 
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Hi Rob:

Thanks for your review!
I will combine the reuse of the same driver into one entry in the next
version.

Best Regards!
xinlei
Xinlei Lee (李昕磊) March 3, 2022, 2:13 a.m. UTC | #4
On Wed, 2022-03-02 at 15:14 +0100, AngeloGioacchino Del Regno wrote:
> Il 02/03/22 06:31, xinlei.lee@mediatek.com ha scritto:
> > From: Xinlei Lee <xinlei.lee@mediatek.com>
> > 
> > Add dt-binding documentation of pwm for MediaTek MT8186 SoC.
> > 
> > Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>
> > ---
> >   Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 3
> > +++
> >   1 file changed, 3 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-
> > disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-
> > disp.yaml
> > index 3a5d1cfed94d..053805846cfe 100644
> > --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> > +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> > @@ -21,6 +21,9 @@ properties:
> >             - mediatek,mt6595-disp-pwm
> >             - mediatek,mt8173-disp-pwm
> >             - mediatek,mt8183-disp-pwm
> > +      - items:
> > +          - const: mediatek,mt8186-disp-pwm
> > +          - const: mediatek,mt8183-disp-pwm
> >         - items:
> >             - const: mediatek,mt8192-disp-pwm
> >             - const: mediatek,mt8183-disp-pwm
> > 
> 
> 
> Hello Xinlei,
> 
> even though repeating these items may not give you errors, this is
> not really
> the best way to do this.
> I've done something similar here:
> 
https://lore.kernel.org/linux-arm-kernel/20220217095242.13761-1-angelogioacchino.delregno@collabora.com/
> 
> So, for the compatibles needing mediatek,mt8183-disp-pwm it should be
> looking
> similar to this:
> 
> - items:
>      - enum:
>          - mediatek,mt8186-disp-pwm
>          - mediatek,mt8192-disp-pwm
>          - mediatek,mt8195-disp-pwm
>      - const: mediatek,mt8183-disp-pwm
> 
> Regards,
> Angelo

Hi Angelo:

Thanks for your review, it's a great suggestion.
I will revise it as you suggested in the next commit.

Best Regards!
xinlei
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
index 3a5d1cfed94d..053805846cfe 100644
--- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
+++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
@@ -21,6 +21,9 @@  properties:
           - mediatek,mt6595-disp-pwm
           - mediatek,mt8173-disp-pwm
           - mediatek,mt8183-disp-pwm
+      - items:
+          - const: mediatek,mt8186-disp-pwm
+          - const: mediatek,mt8183-disp-pwm
       - items:
           - const: mediatek,mt8192-disp-pwm
           - const: mediatek,mt8183-disp-pwm