From: sashiko-bot@kernel.org
To: "Sudheendra Sampath" <giveback4fun@gmail.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
robh@kernel.org, linux-rtc@vger.kernel.org
Subject: Re: [PATCH v2 - dt-bindings: maxim-ds1302: Convert to dt schema v2] dt-bindings: maxim-ds1302: Convert to dt schema
Date: Tue, 08 Sep 2026 19:06:22 +0000 [thread overview]
Message-ID: <20260908190622.B6FD61F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908190137.1168904-1-giveback4fun@gmail.com>
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [Medium] spi-max-frequency is incorrectly restricted to an enum of exact values, preventing valid lower frequencies.
- [Medium] spi-cs-high is unconditionally required, breaking setups with inverted hardware CS.
- [Medium] The binding defines an SPI peripheral and RTC but fails to reference standard core schemas.
- [Low] The YAML conversion silently removes the device tree example section.
--
commit 4b0cc4e2d5ae6befdb10a7457cde3f6698ee83c7
Author: Sudheendra Sampath <giveback4fun@gmail.com>
dt-bindings: maxim-ds1302: Convert to dt schema
This commit converts the Maxim DS1302 real-time clock text binding to the DT
schema format based on code review comments.
> diff --git a/Documentation/devicetree/bindings/rtc/maxim-ds1302.yaml b/Documentation/devicetree/bindings/rtc/maxim-ds1302.yaml
> new file mode 100644
> index 0000000000000..54a2fcf7f8e7b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/maxim-ds1302.yaml
> @@ -0,0 +1,50 @@
[ ... ]
> + spi-max-frequency:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: DS-1302 has 500 kHz if powered at 2.2V, and 2MHz if powered at 5V
> + enum:
> + - 500000
> + - 2000000
[Severity: Medium]
Does this restrict spi-max-frequency too strictly? Schema validation might
fail for perfectly valid device trees that specify frequencies other than
500kHz or 2MHz (e.g., 250000) to ensure signal integrity.
Should this use a constraint like maximum: 2000000 rather than an exact enum?
[ ... ]
> +required:
> + - compatible
> + - reg
> + - spi-max-frequency
> + - spi-3wire
> + - spi-lsb-first
> + - spi-cs-high
[Severity: Medium]
Will this unconditionally require spi-cs-high and break backwards
compatibility for existing setups?
The original text binding noted that this property is required unless inverted
in hardware. Forcing it globally in the required list might reject legitimate
hardware configurations where the chip select is hardware-inverted.
> +
> +additionalProperties: false
[Severity: Medium]
Does additionalProperties: false incorrectly reject standard SPI peripheral
properties here?
If a device tree uses properties like spi-cs-setup-delay-ns or
spi-rx-delay-us, dt_binding_check will throw an error. Should the schema
include references to /schemas/spi/spi-peripheral-props.yaml# and rtc.yaml#,
and then use unevaluatedProperties: false instead to properly inherit standard
capabilities?
[Severity: Low]
Is the examples block missing from the end of the schema file?
The original text file included an example demonstrating node placement.
Without it, dt_binding_check cannot validate the schema against a concrete
instance, and the usage documentation is lost.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908190137.1168904-1-giveback4fun@gmail.com?part=1
next prev parent reply other threads:[~2026-09-08 19:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 19:01 [PATCH v2 - dt-bindings: maxim-ds1302: Convert to dt schema v2] dt-bindings: maxim-ds1302: Convert to dt schema Sudheendra Sampath
2026-09-08 19:06 ` sashiko-bot [this message]
2026-09-09 9:37 ` Krzysztof Kozlowski
2026-09-09 9:38 ` Krzysztof Kozlowski
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=20260908190622.B6FD61F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=giveback4fun@gmail.com \
--cc=linux-rtc@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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