2023-06-12 11:41:32

by Rasmus Villemoes

[permalink] [raw]
Subject: [PATCH 2/8] dt-bindings: rtc: Move isil,isl12022 from trivial-rtc.yaml into own schema file

Move the isil,isl12022 RTC bindings from trivial-rtc.yaml into its own
intersil,isl12022.yaml file, in preparation for adding more bindings.

Signed-off-by: Rasmus Villemoes <[email protected]>
---
.../bindings/rtc/intersil,isl12022.yaml | 42 +++++++++++++++++++
.../devicetree/bindings/rtc/trivial-rtc.yaml | 2 -
2 files changed, 42 insertions(+), 2 deletions(-)
create mode 100644 Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml

diff --git a/Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml b/Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml
new file mode 100644
index 000000000000..899c5edc72e4
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/intersil,isl12022.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intersil ISL12022 Real-time Clock
+
+allOf:
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ const: isil,isl12022
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@6f {
+ compatible = "isil,isl12022";
+ reg = <0x6f>;
+ interrupts-extended = <&gpio1 5 IRQ_TYPE_LEVEL_LOW>;
+ };
+ };
+
+...
diff --git a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
index a3603e638c37..b062c64266a6 100644
--- a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
+++ b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
@@ -45,8 +45,6 @@ properties:
- isil,isl1208
# Intersil ISL1218 Low Power RTC with Battery Backed SRAM
- isil,isl1218
- # Intersil ISL12022 Real-time Clock
- - isil,isl12022
# Loongson-2K Socs/LS7A bridge Real-time Clock
- loongson,ls2x-rtc
# Real Time Clock Module with I2C-Bus
--
2.37.2



2023-06-12 12:31:27

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 2/8] dt-bindings: rtc: Move isil,isl12022 from trivial-rtc.yaml into own schema file


On Mon, 12 Jun 2023 13:30:52 +0200, Rasmus Villemoes wrote:
> Move the isil,isl12022 RTC bindings from trivial-rtc.yaml into its own
> intersil,isl12022.yaml file, in preparation for adding more bindings.
>
> Signed-off-by: Rasmus Villemoes <[email protected]>
> ---
> .../bindings/rtc/intersil,isl12022.yaml | 42 +++++++++++++++++++
> .../devicetree/bindings/rtc/trivial-rtc.yaml | 2 -
> 2 files changed, 42 insertions(+), 2 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml
>

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Traceback (most recent call last):
File "/usr/local/bin/dt-doc-validate", line 62, in <module>
ret |= check_doc(f)
File "/usr/local/bin/dt-doc-validate", line 31, in check_doc
for error in sorted(dtschema.DTValidator.iter_schema_errors(testtree), key=lambda e: e.linecol):
File "/usr/local/lib/python3.10/dist-packages/dtschema/lib.py", line 736, in iter_schema_errors
cls.annotate_error(error, meta_schema, error.schema_path)
File "/usr/local/lib/python3.10/dist-packages/dtschema/lib.py", line 712, in annotate_error
schema = schema[p]
KeyError: 'type'
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml: 'maintainers' is a required property
hint: Metaschema for devicetree binding documentation
from schema $id: http://devicetree.org/meta-schemas/base.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


2023-06-12 13:04:43

by Rasmus Villemoes

[permalink] [raw]
Subject: Re: [PATCH 2/8] dt-bindings: rtc: Move isil,isl12022 from trivial-rtc.yaml into own schema file

On 12/06/2023 14.26, Rob Herring wrote:
>
> On Mon, 12 Jun 2023 13:30:52 +0200, Rasmus Villemoes wrote:
>> Move the isil,isl12022 RTC bindings from trivial-rtc.yaml into its own
>> intersil,isl12022.yaml file, in preparation for adding more bindings.
>>
>> Signed-off-by: Rasmus Villemoes <[email protected]>
>> ---
>> .../bindings/rtc/intersil,isl12022.yaml | 42 +++++++++++++++++++
>> .../devicetree/bindings/rtc/trivial-rtc.yaml | 2 -
>> 2 files changed, 42 insertions(+), 2 deletions(-)
>> create mode 100644 Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml
>>
>
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>
> yamllint warnings/errors:
>
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml: 'maintainers' is a required property
> hint: Metaschema for devicetree binding documentation
> from schema $id: http://devicetree.org/meta-schemas/base.yaml#

Hm ok. Can/should I copy the value from the trivial-rtc.yaml? Alexandre,
would that be ok with you?

Is there some simple way to do that dt_binding_check for a single file
or just a few? It seems to take forever to run on the whole tree.

Rasmus


2023-06-12 14:34:42

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 2/8] dt-bindings: rtc: Move isil,isl12022 from trivial-rtc.yaml into own schema file

On Mon, Jun 12, 2023 at 02:36:03PM +0200, Rasmus Villemoes wrote:
> On 12/06/2023 14.26, Rob Herring wrote:
> >
> > On Mon, 12 Jun 2023 13:30:52 +0200, Rasmus Villemoes wrote:
> >> Move the isil,isl12022 RTC bindings from trivial-rtc.yaml into its own
> >> intersil,isl12022.yaml file, in preparation for adding more bindings.
> >>
> >> Signed-off-by: Rasmus Villemoes <[email protected]>
> >> ---
> >> .../bindings/rtc/intersil,isl12022.yaml | 42 +++++++++++++++++++
> >> .../devicetree/bindings/rtc/trivial-rtc.yaml | 2 -
> >> 2 files changed, 42 insertions(+), 2 deletions(-)
> >> create mode 100644 Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml
> >>
> >
> > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> > on your patch (DT_CHECKER_FLAGS is new in v5.13):
> >
> > yamllint warnings/errors:
> >
> > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml: 'maintainers' is a required property
> > hint: Metaschema for devicetree binding documentation
> > from schema $id: http://devicetree.org/meta-schemas/base.yaml#
>
> Hm ok. Can/should I copy the value from the trivial-rtc.yaml? Alexandre,
> would that be ok with you?

Alexandre agreed, but in general the maintainer here should be someone
that has the h/w and/or cares about it, not subsystem maintainers.

Rob

2023-06-12 14:39:19

by Alexandre Belloni

[permalink] [raw]
Subject: Re: [PATCH 2/8] dt-bindings: rtc: Move isil,isl12022 from trivial-rtc.yaml into own schema file

On 12/06/2023 14:36:03+0200, Rasmus Villemoes wrote:
> On 12/06/2023 14.26, Rob Herring wrote:
> >
> > On Mon, 12 Jun 2023 13:30:52 +0200, Rasmus Villemoes wrote:
> >> Move the isil,isl12022 RTC bindings from trivial-rtc.yaml into its own
> >> intersil,isl12022.yaml file, in preparation for adding more bindings.
> >>
> >> Signed-off-by: Rasmus Villemoes <[email protected]>
> >> ---
> >> .../bindings/rtc/intersil,isl12022.yaml | 42 +++++++++++++++++++
> >> .../devicetree/bindings/rtc/trivial-rtc.yaml | 2 -
> >> 2 files changed, 42 insertions(+), 2 deletions(-)
> >> create mode 100644 Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml
> >>
> >
> > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> > on your patch (DT_CHECKER_FLAGS is new in v5.13):
> >
> > yamllint warnings/errors:
> >
> > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml: 'maintainers' is a required property
> > hint: Metaschema for devicetree binding documentation
> > from schema $id: http://devicetree.org/meta-schemas/base.yaml#
>
> Hm ok. Can/should I copy the value from the trivial-rtc.yaml? Alexandre,
> would that be ok with you?
>

Yes

> Is there some simple way to do that dt_binding_check for a single file
> or just a few? It seems to take forever to run on the whole tree.
>

The kernel documentation has this example:

make dt_binding_check DT_SCHEMA_FILES=trivial-devices.yaml


--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

2023-06-13 08:21:51

by Rasmus Villemoes

[permalink] [raw]
Subject: Re: [PATCH 2/8] dt-bindings: rtc: Move isil,isl12022 from trivial-rtc.yaml into own schema file

On 12/06/2023 16.20, Rob Herring wrote:
> On Mon, Jun 12, 2023 at 02:36:03PM +0200, Rasmus Villemoes wrote:
>> On 12/06/2023 14.26, Rob Herring wrote:
>>>
>>> On Mon, 12 Jun 2023 13:30:52 +0200, Rasmus Villemoes wrote:
>>>> Move the isil,isl12022 RTC bindings from trivial-rtc.yaml into its own
>>>> intersil,isl12022.yaml file, in preparation for adding more bindings.
>>>>
>>>> Signed-off-by: Rasmus Villemoes <[email protected]>
>>>> ---
>>>> .../bindings/rtc/intersil,isl12022.yaml | 42 +++++++++++++++++++
>>>> .../devicetree/bindings/rtc/trivial-rtc.yaml | 2 -
>>>> 2 files changed, 42 insertions(+), 2 deletions(-)
>>>> create mode 100644 Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml
>>>>
>>>
>>> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
>>> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>>>
>>> yamllint warnings/errors:
>>>
>>> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml: 'maintainers' is a required property
>>> hint: Metaschema for devicetree binding documentation
>>> from schema $id: http://devicetree.org/meta-schemas/base.yaml#
>>
>> Hm ok. Can/should I copy the value from the trivial-rtc.yaml? Alexandre,
>> would that be ok with you?
>
> Alexandre agreed, but in general the maintainer here should be someone
> that has the h/w and/or cares about it, not subsystem maintainers.

OK. Right now I have the hardware and care about it because I've been
hired to work on it.

Incidentally, my backlog for this project/product also contains
upstreaming of a new gpiochip driver and DT bindings. I assume I should
just list myself as maintainer in that new .yaml file, even if I can't
promise to have time to review changes and/or even hardware to test on
12 months from now.

Rasmus