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

From: AngeloGioacchino Del Regno
Date: Wed Mar 02 2022 - 09:15:00 EST


Il 02/03/22 06:31, xinlei.lee@xxxxxxxxxxxx ha scritto:
From: Xinlei Lee <xinlei.lee@xxxxxxxxxxxx>

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

Signed-off-by: Xinlei Lee <xinlei.lee@xxxxxxxxxxxx>
---
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@xxxxxxxxxxxxx/

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