[2/8] dt-bindings: rtc: Move isil,isl12022 from trivial-rtc.yaml into own schema file
Message ID | 20230612113059.247275-3-linux@rasmusvillemoes.dk |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2522363vqr; Mon, 12 Jun 2023 04:41:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4+OvVjqg76RPWPfz961RQQV76RUN6qh+AfJYWk1x8M8Dud9qdHta3Pw1hyXlVGO/8RJ2el X-Received: by 2002:aa7:d591:0:b0:514:7f5e:a042 with SMTP id r17-20020aa7d591000000b005147f5ea042mr4406670edq.42.1686570116223; Mon, 12 Jun 2023 04:41:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686570116; cv=none; d=google.com; s=arc-20160816; b=AT2s7vF99iTwDf3dQAHjzDd8d7ig6UK/+4U32BfrT9kJI4IjIveI2amQWjy94JeNI6 QDGoupyoyaAgBbNcwZkc9BLIkSPC2kaQb0CdS6NNNGOkF6vada0vNIEEwuhDL6XESvkl BwqSdNtSQXlzzfgaPOv1EcLT/g65t8aL1OFtFERlXkOdhv/a6nu4Fs25f0BE8jcE1Jok NiZ3D9bTzlurE4kRxtNokGAaQJxBUqPbxeuOxyQ6JkVgzfkTKYMrGXBy2P3DSz3nAc/d q9WtSzIhPy9FAxwLqB55tatSeaLLe3i2Elbbd1AIzIylnDozP4hAPYsC47nRSK7IhwmP Tkxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YpuBhKsWEFwrG+U6fAOV3v6Ozr7I0OWP1C3aU0PzTV4=; b=xszaLe0FVXp3qL/mzH4P5VWYKhSV8G5SmCJoSd+7WZX4XtMeubItZwT9Tekg9adJM1 B9t7SvBmxK/5FJRIfBMMYwCxI61DjNFkpV2p/c6TdLqfRLLGW5NlIp3QyVRz8bTe+Rys FM1kn4hdM9c55fI8oUUzg81AJ/fRYhxcyeupJa/u2u9r7e2E0p7RFP7X2jjfxMKgngOb CSa4Pf09zAA4nCTkjzti7N5Up+KEfmTjbSCzukHQV2zpzsa2zJO82aeOcIpLdKIG3b0n ot0Hn85wNpjBI1TiF8WsAOYLWd+ado4ieEvhFtMWKXFIhfJKcFEXceAjaYDxwpMlFy0e eJuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=LconL8RH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h14-20020aa7c60e000000b00516a4244b0dsi1589647edq.137.2023.06.12.04.41.31; Mon, 12 Jun 2023 04:41:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=LconL8RH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234527AbjFLLjh (ORCPT <rfc822;rust.linux@gmail.com> + 99 others); Mon, 12 Jun 2023 07:39:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233010AbjFLLiZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 12 Jun 2023 07:38:25 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EF8346BF for <linux-kernel@vger.kernel.org>; Mon, 12 Jun 2023 04:31:07 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f6370ddd27so4816998e87.0 for <linux-kernel@vger.kernel.org>; Mon, 12 Jun 2023 04:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; t=1686569465; x=1689161465; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YpuBhKsWEFwrG+U6fAOV3v6Ozr7I0OWP1C3aU0PzTV4=; b=LconL8RHpCpwjklWxyvC74ECVtkdib0L3H+oc1qrqBvkwzexWBLycAyBp4jZWjzYVF FbfFFqTLr7w3aEXgRDnHs8dWJe9JM+P+LRR7Cp506h6WBAFLpN7ANb2nvAygrAkXhKRL TcbDgzjRfLBsHxemcdzt5R6DkVdEwuyG2ChCg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686569465; x=1689161465; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YpuBhKsWEFwrG+U6fAOV3v6Ozr7I0OWP1C3aU0PzTV4=; b=M17ebSxCnu3E+AzdCSGWUAV7wAcIfqK7Q6GgkclJnYy5pzf6fEt7SHz0Q0uy5fxtXZ b1edg6jsnOXciEurIqg6WhV5GTHnxzswzLQjgvO1KdYxzMJ9O4OpHFeXZ7zARZygnoUw WTFGIWOxsjTmkue+mt63bD54qhPRAtegotJ4A7uai8k7b/Ajr2E0C5dOUHVtECVGwkKd SKXkNGnZqB2DVp9i03a9xvW6lq4NpV3do/x9+sNaj9nLYsXSzwBtTSLoDbeYHQ7Vy+I9 FJP6frAwx2raQA67TTi+7MAz8BmjXUL+76XTCSc8qTn9sfzrYlWlaa2XBZy5Yj7Ky4so 1KFQ== X-Gm-Message-State: AC+VfDwAU68kyq2tblsjZp//ruz9oErMmNoXaNGgwfIngYlDw5wGcPxF SpDuApwUfbE4JAl/OnlnGQafHg== X-Received: by 2002:a19:e34e:0:b0:4f6:21db:e584 with SMTP id c14-20020a19e34e000000b004f621dbe584mr3372913lfk.0.1686569465413; Mon, 12 Jun 2023 04:31:05 -0700 (PDT) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id w26-20020a19c51a000000b004edb8fac1cesm1399320lfe.215.2023.06.12.04.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 04:31:04 -0700 (PDT) From: Rasmus Villemoes <linux@rasmusvillemoes.dk> To: Alessandro Zummo <a.zummo@towertech.it>, Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, linux-rtc@vger.kernel.org, Rasmus Villemoes <linux@rasmusvillemoes.dk>, linux-kernel@vger.kernel.org Subject: [PATCH 2/8] dt-bindings: rtc: Move isil,isl12022 from trivial-rtc.yaml into own schema file Date: Mon, 12 Jun 2023 13:30:52 +0200 Message-Id: <20230612113059.247275-3-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230612113059.247275-1-linux@rasmusvillemoes.dk> References: <20230612113059.247275-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768496946146811675?= X-GMAIL-MSGID: =?utf-8?q?1768496946146811675?= |
Series |
rtc: isl12022: battery backup voltage and clock support
|
|
Commit Message
Rasmus Villemoes
June 12, 2023, 11:30 a.m. UTC
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 <linux@rasmusvillemoes.dk>
---
.../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
Comments
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 <linux@rasmusvillemoes.dk> > --- > .../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/20230612113059.247275-3-linux@rasmusvillemoes.dk 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.
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 <linux@rasmusvillemoes.dk> >> --- >> .../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
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 <linux@rasmusvillemoes.dk> > >> --- > >> .../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
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 <linux@rasmusvillemoes.dk> > >> --- > >> .../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
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 <linux@rasmusvillemoes.dk> >>>> --- >>>> .../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
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