Linux-RTC Archive mirror
 help / color / mirror / Atom feed
From: Javier Carrasco <javier.carrasco@wolfvision.net>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Javier Carrasco <javier.carrasco.cruz@gmail.com>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Emil Bartczak <emilbart@gmail.com>, Josef Gajdusek <atx@atx.name>
Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: rtc: mcp795: convert to YAML
Date: Wed, 6 Sep 2023 13:48:16 +0200	[thread overview]
Message-ID: <808e0a07-9bba-0499-564f-83872101a19a@wolfvision.net> (raw)
In-Reply-To: <bb0548ed-e88c-bd21-caeb-1b767259b0ad@linaro.org>

Hi Krzysztof,

On 06.09.23 12:42, Krzysztof Kozlowski wrote:
> On 06/09/2023 12:23, Javier Carrasco wrote:
>> Convert the MCP795 bindings from text to YAML format to support bindings
>> validation.
>>
>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
>> ---
>> YAML is the preferred format for dt-bindings, which allows validation.
>> ---
>>  .../devicetree/bindings/rtc/maxim,mcp795.txt       | 11 -------
>>  .../devicetree/bindings/rtc/maxim,mcp795.yaml      | 35 ++++++++++++++++++++++
>>  2 files changed, 35 insertions(+), 11 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/rtc/maxim,mcp795.txt b/Documentation/devicetree/bindings/rtc/maxim,mcp795.txt
>> deleted file mode 100644
>> index a59fdd8c236d..000000000000
>> --- a/Documentation/devicetree/bindings/rtc/maxim,mcp795.txt
>> +++ /dev/null
>> @@ -1,11 +0,0 @@
>> -* Maxim MCP795		SPI Serial Real-Time Clock
>> -
>> -Required properties:
>> -- compatible: Should contain "maxim,mcp795".
>> -- reg: SPI address for chip
>> -
>> -Example:
>> -	mcp795: rtc@0 {
>> -		compatible = "maxim,mcp795";
>> -		reg = <0>;
>> -	};
>> diff --git a/Documentation/devicetree/bindings/rtc/maxim,mcp795.yaml b/Documentation/devicetree/bindings/rtc/maxim,mcp795.yaml
>> new file mode 100644
>> index 000000000000..77e465747d43
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/rtc/maxim,mcp795.yaml
>> @@ -0,0 +1,35 @@
>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/rtc/maxim,mcp795.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Maxim MCP795 SPI Serial Real Time Clock
>> +
>> +allOf:
>> +  - $ref: rtc.yaml#
> 
> Nit: By convention, this goes after maintainers/description.
> 
>> +
>> +maintainers:
>> +  - Josef Gajdusek <atx@atx.name>
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - maxim,mcp795
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +additionalProperties: false
> 
> This should be unevaluatedProperties:false, so you allow other common
> RTC properties. But then, it is even smaller than trivial RTC devices, so:
> 1. What about interrupts? No interrupt line?
> 2. If there is interrupt line, just add it to trivial-rtc. Otherwise,
> it's fine here with changes above.
> 
> Best regards,
> Krzysztof
> 
The RTC has indeed an interrupt line and I just checked that the driver
supports it. Apparently the functionality was added later but never
documented.
The interrupt is optional and therefore it is a perfect candidate to get
into trivial-rtc in v2.

Thanks and best regards,
Javier Carrasco

  reply	other threads:[~2023-09-06 11:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 10:23 [PATCH] dt-bindings: rtc: mcp795: convert to YAML Javier Carrasco
2023-09-06 10:42 ` Krzysztof Kozlowski
2023-09-06 11:48   ` Javier Carrasco [this message]
2023-09-06 11:31 ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=808e0a07-9bba-0499-564f-83872101a19a@wolfvision.net \
    --to=javier.carrasco@wolfvision.net \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=atx@atx.name \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=emilbart@gmail.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).