From: sashiko-bot@kernel.org
To: "Binbin Zhou" <zhoubinbin@loongson.cn>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v9 6/7] dt-bindings: thermal: loongson,ls2k-thermal: Add compatible for Loongson-2K0300
Date: Mon, 09 Nov 2026 08:18:28 +0000 [thread overview]
Message-ID: <sashiko-outbox-204581@kernel.org> (raw)
In-Reply-To: <2a1852ad8091cde3c07b5b19f51ab35b1378a280.1794211535.git.zhoubinbin@loongson.cn>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] dt-bindings: thermal: loongson,ls2k-thermal: unwieldy allOf
conditionals
--
commit f12fbd90282902d144235a2ecc3e0dfbcabab2a2
Author: Binbin Zhou <zhoubinbin@loongson.cn>
dt-bindings: thermal: loongson,ls2k-thermal: Add compatible for Loongson-2K0300
This commit adds the loongson,ls2k0300-thermal compatible string along
with the loongson,chipid phandle property and per-variant allOf
conditionals for reg and loongson,chipid.
> diff --git a/Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml b/Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml
> index 79e691b08341c..d312e27737a20 100644
> --- a/Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml
> +++ b/Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml
[ ... ]
> @@ -34,28 +32,56 @@ properties:
> '#thermal-sensor-cells':
> const: 1
>
> + loongson,chipid:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description:
> + Phandle to the syscon with the Loongson-2K0300 CHIP ID.
> +
> required:
> - compatible
> - reg
> - interrupts
>
> -if:
> - properties:
> - compatible:
> - contains:
> - enum:
> - - loongson,ls2k2000-thermal
> +allOf:
> + - $ref: /schemas/thermal/thermal-sensor.yaml#
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: loongson,ls2k0300-thermal
> + then:
> + properties:
> + reg:
> + items:
> + - description: Thermal base register region
> + required:
> + - loongson,chipid
>
> -then:
> - properties:
> - reg:
> - minItems: 2
> - maxItems: 2
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: loongson,ls2k1000-thermal
> + then:
> + properties:
> + loongson,chipid: false
> + reg:
> + items:
> + - description: Thermal base register region
>
> -else:
> - properties:
> - reg:
> - maxItems: 1
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: loongson,ls2k2000-thermal
> + then:
> + properties:
> + loongson,chipid: false
> + reg:
> + items:
> + - description: Thermal base register region
> + - description: Thermal data output register region
[Severity: Low]
This isn't a bug, but with loongson,ls2k0300-thermal added, every
standalone variant in this binding now has its own if-then block in
allOf duplicating the reg item descriptions and differing on register
regions or loongson,chipid requirements. Would it be cleaner to split
the diverging variants into separate schema documents, or at least
define the reg items descriptions once under top-level properties and
only narrow the constraints in the conditionals?
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1794211535.git.zhoubinbin@loongson.cn?part=6
next prev parent reply other threads:[~2026-11-09 8:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 8:08 [PATCH v9 0/7] thermal/drivers/loongson2: Fix trip programming and add Loongson-2K0300 support Binbin Zhou
2026-11-09 8:08 ` [PATCH v9 1/7] thermal/drivers/loongson2: Fix negative trip conversion in set_trips Binbin Zhou
2026-11-09 8:08 ` [PATCH v9 2/7] thermal/drivers/loongson2: Fix clamp() usage for thermal trip points Binbin Zhou
2026-11-09 8:15 ` sashiko-bot
2026-11-09 8:08 ` [PATCH v9 3/7] thermal/drivers/loongson2: Fix Loongson-2K2000 trip point programming Binbin Zhou
2026-11-09 8:09 ` [PATCH v9 4/7] thermal/drivers/loongson2: Simplify thermal sensor registration Binbin Zhou
2026-11-09 8:09 ` [PATCH v9 5/7] thermal/drivers/loongson2: Move per-SoC ops and init into chip data Binbin Zhou
2026-11-09 8:09 ` [PATCH v9 6/7] dt-bindings: thermal: loongson,ls2k-thermal: Add compatible for Loongson-2K0300 Binbin Zhou
2026-11-09 8:18 ` sashiko-bot [this message]
2026-11-09 8:10 ` [PATCH v9 7/7] thermal/drivers/loongson2: Add Loongson-2K0300 support Binbin Zhou
2026-11-09 8:32 ` sashiko-bot
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=sashiko-outbox-204581@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=zhoubinbin@loongson.cn \
/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