mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Otto Pflüger" <otto.pflueger@abscue.de>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,  Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Orson Zhai <orsonzhai@gmail.com>,
	 Baolin Wang <baolin.wang@linux.alibaba.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>, Lee Jones <lee@kernel.org>,
	 linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 2/3] dt-bindings: mfd: sprd,sc2731: Reference sprd,sc2730-regulator bindings
Date: Sat, 21 Feb 2026 11:50:29 +0100	[thread overview]
Message-ID: <20260221-unyielding-violet-dragon-6121d5@quoll> (raw)
In-Reply-To: <20260220-sc2730-regulators-v1-2-3f2bbc9ecf14@abscue.de>

On Fri, Feb 20, 2026 at 06:01:50PM +0100, Otto Pflüger wrote:
> The SC2730 PMIC provides a different set of regulators than SC2731 and
> thus requires separate regulator bindings. Determine which bindings to
> include based on the compatible string of the PMIC.
> 
> Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de>
> ---
>  Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml b/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml
> index b023e1ef8d3c..e4ebb511bba1 100644
> --- a/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml
> +++ b/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml
> @@ -99,6 +99,19 @@ required:
>    - '#interrupt-cells'
>    - '#size-cells'
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - sprd,sc2730
> +    then:
> +      properties:
> +        regulators:
> +          type: object
> +          $ref: /schemas/regulator/sprd,sc2730-regulator.yaml#

This contradicts the top-level which says it is sc2731. It cannot be
both. You just need oneOf for $ref or compatible, in the top level place
for regulators and then just drop this. If you want additionally (!!!)
to put constraints what can be the child, it's fine, but just with
compatible if you have it and also what about all of other children?

... which will lead you to next problem - it's getting complicated, so
why not having it just separate schema?

Best regards,
Krzysztof


  reply	other threads:[~2026-02-21 10:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-20 17:01 [PATCH 0/3] regulator: Add support for Unisoc SC2730 PMIC regulators Otto Pflüger
2026-02-20 17:01 ` [PATCH 1/3] dt-bindings: regulator: Document Unisoc SC2730 PMIC bindings Otto Pflüger
2026-02-21 10:52   ` Krzysztof Kozlowski
2026-02-21 13:02     ` Otto Pflüger
2026-02-21 13:17       ` Krzysztof Kozlowski
2026-02-20 17:01 ` [PATCH 2/3] dt-bindings: mfd: sprd,sc2731: Reference sprd,sc2730-regulator bindings Otto Pflüger
2026-02-21 10:50   ` Krzysztof Kozlowski [this message]
2026-02-20 17:01 ` [PATCH 3/3] regulator: Add regulator driver for Unisoc SC2730 PMIC Otto Pflüger
2026-02-24  6:28   ` Baolin Wang

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=20260221-unyielding-violet-dragon-6121d5@quoll \
    --to=krzk@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=otto.pflueger@abscue.de \
    --cc=robh@kernel.org \
    --cc=zhang.lyra@gmail.com \
    /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®