Skip to content

Commit f769df1

Browse files
akemnadelag-linaro
authored andcommitted
dt-bindings: mfd: twl: Convert trivial subdevices to json-schema
Convert subdevices with just an interrupt and compatbile to json-schema and wire up already converted subdevices. RTC is available in all variants, so allow it unconditionally. GPADC binding for TWL603X uses two different compatibles, so specify just the compatible and do not include it. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Acked-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20240401081831.456828-1-andreas@kemnade.info Signed-off-by: Lee Jones <lee@kernel.org>
1 parent db85168 commit f769df1

4 files changed

Lines changed: 71 additions & 43 deletions

File tree

Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt

Lines changed: 0 additions & 21 deletions
This file was deleted.

Documentation/devicetree/bindings/mfd/ti,twl.yaml

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,67 @@ description: |
1515
USB transceiver or Audio amplifier.
1616
These chips are connected to an i2c bus.
1717
18+
allOf:
19+
- if:
20+
properties:
21+
compatible:
22+
contains:
23+
const: ti,twl4030
24+
then:
25+
properties:
26+
madc:
27+
type: object
28+
$ref: /schemas/iio/adc/ti,twl4030-madc.yaml
29+
unevaluatedProperties: false
30+
31+
bci:
32+
type: object
33+
$ref: /schemas/power/supply/twl4030-charger.yaml
34+
unevaluatedProperties: false
35+
36+
pwrbutton:
37+
type: object
38+
additionalProperties: false
39+
properties:
40+
compatible:
41+
const: ti,twl4030-pwrbutton
42+
interrupts:
43+
items:
44+
- items:
45+
const: 8
46+
47+
watchdog:
48+
type: object
49+
additionalProperties: false
50+
properties:
51+
compatible:
52+
const: ti,twl4030-wdt
53+
54+
- if:
55+
properties:
56+
compatible:
57+
contains:
58+
const: ti,twl6030
59+
then:
60+
properties:
61+
gpadc:
62+
type: object
63+
properties:
64+
compatible:
65+
const: ti,twl6030-gpadc
66+
- if:
67+
properties:
68+
compatible:
69+
contains:
70+
const: ti,twl6032
71+
then:
72+
properties:
73+
gpadc:
74+
type: object
75+
properties:
76+
compatible:
77+
const: ti,twl6032-gpadc
78+
1879
properties:
1980
compatible:
2081
description:
@@ -42,7 +103,16 @@ properties:
42103
"#clock-cells":
43104
const: 1
44105

45-
additionalProperties: false
106+
rtc:
107+
type: object
108+
additionalProperties: false
109+
properties:
110+
compatible:
111+
const: ti,twl4030-rtc
112+
interrupts:
113+
maxItems: 1
114+
115+
unevaluatedProperties: false
46116

47117
required:
48118
- compatible

Documentation/devicetree/bindings/rtc/twl-rtc.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)