mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Srinivas Neeli <srinivas.neeli@xilinx.com>,
	linux@roeck-us.net, krzysztof.kozlowski+dt@linaro.org,
	wim@linux-watchdog.org, michal.simek@xilinx.com,
	shubhrajyoti.datta@xilinx.com
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-watchdog@vger.kernel.org, git@xilinx.com, git@amd.com,
	sgoud@xilinx.com,
	Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Subject: Re: [PATCH] dt-bindings: Convert Xilinx watchdog bindings to json-schema
Date: Thu, 18 Aug 2022 16:39:13 +0300	[thread overview]
Message-ID: <7f8305ee-d706-a5a3-0691-1aa296a65125@linaro.org> (raw)
In-Reply-To: <20220818124207.61313-1-srinivas.neeli@xilinx.com>

On 18/08/2022 15:42, Srinivas Neeli wrote:
> Convert Xilinx watchdog bindings to DT schema format using json-schema
> 
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>

Use subject perfixes matching the subsystem (git log --oneline -- ...).


> diff --git a/Documentation/devicetree/bindings/watchdog/xlnx,xps-timebase.yaml b/Documentation/devicetree/bindings/watchdog/xlnx,xps-timebase.yaml
> new file mode 100644
> index 000000000000..fd2e3f2df54c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/xlnx,xps-timebase.yaml

xlnx,xps-timebase-wdt.yaml
(name should be matching compatibles)

> @@ -0,0 +1,71 @@
> +# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/xlnx,xps-timebase.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Xilinx AXI/PLB softcore and window Watchdog Timer
> +
> +allOf:
> +  - $ref: "watchdog.yaml#"

No need for quotes. Put the allOf just above "properties".

> +
> +maintainers:
> +  - Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> +  - Srinivas Neeli <srinivas.neeli@xilinx.com>
> +
> +description:
> +  The Timebase watchdog timer(WDT) is a free-running 32 bit counter.
> +  WDT uses a dual-expiration architecture. After one expiration of
> +  the timeout interval, an interrupt is generated and the WDT state
> +  bit is set to one in the status register. If the state bit is not
> +  cleared (by writing a one to the state bit) before the next
> +  expiration of the timeout interval, a WDT reset is generated.
> +
> +properties:
> +  compatible:
> +    oneOf:

There is no other option, so no need for oneOf.

> +      - items:

You do not have items, just one item. Drop items as well.

> +          - enum:
> +              - xlnx,xps-timebase-wdt-1.01.a
> +              - xlnx,xps-timebase-wdt-1.00.a
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    minItems: 1

instead maxItems

> +
> +  clock-frequency:
> +    $ref: /schemas/types.yaml#/definitions/uint32

No need for ref. This is a standard property.

> +    description: Frequency of clock in Hz

Would be useful to add constraints (minimum/maximum and default), but
that's not a big deal.

> +
> +  xlnx,wdt-interval:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: Watchdog timeout interval
> +    minimum: 8
> +    maximum: 32
> +
> +  xlnx,wdt-enable-once:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [0, 1]
> +    description: If watchdog is configured as enable once,
> +                 then the watchdog cannot be disabled after
> +                 it has been enabled.
> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    watchdog@40100000 {
> +      compatible = "xlnx,xps-timebase-wdt-1.00.a";
> +      reg = <0x40100000 0x1000>;
> +      clock-frequency = <50000000>;
> +      clocks = <&clkc 15>;
> +      xlnx,wdt-enable-once = <0x0>;
> +      xlnx,wdt-interval = <0x1b>;
> +    } ;

No need for space after ';'



Best regards,
Krzysztof

  reply	other threads:[~2022-08-18 13:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 12:42 Srinivas Neeli
2022-08-18 13:39 ` Krzysztof Kozlowski [this message]
2022-08-18 14:52   ` Neeli, Srinivas

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=7f8305ee-d706-a5a3-0691-1aa296a65125@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=git@amd.com \
    --cc=git@xilinx.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=michal.simek@xilinx.com \
    --cc=radhey.shyam.pandey@xilinx.com \
    --cc=sgoud@xilinx.com \
    --cc=shubhrajyoti.datta@xilinx.com \
    --cc=srinivas.neeli@xilinx.com \
    --cc=wim@linux-watchdog.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

all inboxes | Powered by JetHome®