Skip to content

Commit ef75324

Browse files
krzkthierryreding
authored andcommitted
dt-bindings: pwm: rockchip: Include generic PWM schema
Include generic pwm.yaml schema, which enforces PWM node naming and brings pwm-cells requirement. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
1 parent a63cb1a commit ef75324

File tree

1 file changed

+38
-36
lines changed

1 file changed

+38
-36
lines changed

Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -51,42 +51,44 @@ properties:
5151
required:
5252
- compatible
5353
- reg
54-
- "#pwm-cells"
55-
56-
if:
57-
properties:
58-
compatible:
59-
contains:
60-
enum:
61-
- rockchip,rk3328-pwm
62-
- rockchip,rv1108-pwm
63-
64-
then:
65-
properties:
66-
clocks:
67-
items:
68-
- description: Used to derive the functional clock for the device.
69-
- description: Used as the APB bus clock.
70-
71-
clock-names:
72-
items:
73-
- const: pwm
74-
- const: pclk
75-
76-
required:
77-
- clocks
78-
- clock-names
79-
80-
else:
81-
properties:
82-
clocks:
83-
maxItems: 1
84-
description:
85-
Used both to derive the functional clock
86-
for the device and as the bus clock.
87-
88-
required:
89-
- clocks
54+
55+
allOf:
56+
- $ref: pwm.yaml#
57+
58+
- if:
59+
properties:
60+
compatible:
61+
contains:
62+
enum:
63+
- rockchip,rk3328-pwm
64+
- rockchip,rv1108-pwm
65+
66+
then:
67+
properties:
68+
clocks:
69+
items:
70+
- description: Used to derive the functional clock for the device.
71+
- description: Used as the APB bus clock.
72+
73+
clock-names:
74+
items:
75+
- const: pwm
76+
- const: pclk
77+
78+
required:
79+
- clocks
80+
- clock-names
81+
82+
else:
83+
properties:
84+
clocks:
85+
maxItems: 1
86+
description:
87+
Used both to derive the functional clock
88+
for the device and as the bus clock.
89+
90+
required:
91+
- clocks
9092

9193
additionalProperties: false
9294

0 commit comments

Comments
 (0)