Skip to content

Commit ac739ba

Browse files
bijudasalexandrebelloni
authored andcommitted
dt-bindings: rtc: isl1208: Convert to json-schema
Convert the isl1208 RTC device tree binding documentation to json-schema. Update the example to match reality. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230623140948.384762-5-biju.das.jz@bp.renesas.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 0e6f36c commit ac739ba

2 files changed

Lines changed: 89 additions & 38 deletions

File tree

Documentation/devicetree/bindings/rtc/isil,isl1208.txt

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rtc/isil,isl1208.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Intersil ISL1209/19 I2C RTC/Alarm chip with event in
8+
9+
maintainers:
10+
- Biju Das <biju.das.jz@bp.renesas.com>
11+
- Trent Piepho <tpiepho@gmail.com>
12+
13+
description:
14+
ISL12X9 have additional pins EVIN and EVDET for tamper detection, while the
15+
ISL1208 and ISL1218 do not.
16+
17+
properties:
18+
compatible:
19+
enum:
20+
- isil,isl1208
21+
- isil,isl1209
22+
- isil,isl1218
23+
- isil,isl1219
24+
25+
reg:
26+
maxItems: 1
27+
28+
interrupts:
29+
minItems: 1
30+
maxItems: 2
31+
32+
interrupt-names:
33+
minItems: 1
34+
items:
35+
- const: irq
36+
- const: evdet
37+
38+
isil,ev-evienb:
39+
$ref: /schemas/types.yaml#/definitions/uint32
40+
enum: [ 0, 1 ]
41+
description: |
42+
Enable or disable internal pull on EVIN pin
43+
Default will leave the non-volatile configuration of the pullup
44+
as is.
45+
<0> : Enables internal pull-up on evin pin
46+
<1> : Disables internal pull-up on evin pin
47+
48+
required:
49+
- compatible
50+
- reg
51+
52+
allOf:
53+
- $ref: rtc.yaml#
54+
- if:
55+
properties:
56+
compatible:
57+
contains:
58+
enum:
59+
- isil,isl1209
60+
- isil,isl1219
61+
then:
62+
properties:
63+
interrupts:
64+
maxItems: 2
65+
interrupt-names:
66+
items:
67+
- const: irq
68+
- const: evdet
69+
else:
70+
properties:
71+
interrupts:
72+
maxItems: 1
73+
interrupt-names:
74+
items:
75+
- const: irq
76+
77+
unevaluatedProperties: false
78+
79+
examples:
80+
- |
81+
i2c {
82+
#address-cells = <1>;
83+
#size-cells = <0>;
84+
85+
rtc_twi: rtc@6f {
86+
compatible = "isil,isl1208";
87+
reg = <0x6f>;
88+
};
89+
};

0 commit comments

Comments
 (0)