All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Mark Brown <broonie@kernel.org>
Cc: Chanwoo Choi <cw00.choi@samsung.com>, Pavel Machek <pavel@ucw.cz>,
	Rob Herring <robh+dt@kernel.org>,
	Lee Jones <lee.jones@linaro.org>,
	Sebastian Reichel <sre@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org,
	devicetree@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v2 3/4] regulator: dt-bindings: maxim,max77693: convert to dtschema
Date: Mon, 14 Feb 2022 18:01:17 +0100	[thread overview]
Message-ID: <b0aaf1e6-c626-e68c-a0d2-4a7ff372b395@canonical.com> (raw)
In-Reply-To: <YgqIiv8fZeqFFUHX@sirena.org.uk>

On 14/02/2022 17:51, Mark Brown wrote:
> On Mon, Feb 14, 2022 at 05:45:40PM +0100, Krzysztof Kozlowski wrote:
>> On 14/02/2022 17:41, Mark Brown wrote:
>>>> +    properties:
>>>> +      regulator-name: true
>>>> +      regulator-always-on: true
>>>> +      regulator-boot-on: true
> 
>>> Why are these specific generic regulator properties enumerated?  
> 
>> additionalProperties=false is used, so all properties, also ones from
>> regulator.yaml, have to be mentioned.
> 
>> Why this approach was used? Because the hardware here is very limited,
>> so no other properties are expected. No other features are supported.
> 
> That's not going to scale well if we add any new features in the core,
> and doesn't include things like coupling which could be applied to any
> regulator.

Relaxing constraints - removing required nodes and using
uneavluatedProperties=false - is still possible. Unlike the other way if
we ever wanted to restrict too flexible bindings.

You mantioned new features - this approach does not change that. If you
add new properties to common schema, you already alter bindings. Just
because we use common part, it does not change the fact that it is a
bindings change. Adding new features in common schema is the same
binding change as adding new feature in the specific binding, except
more work.

I guess you though that work in scaling, so yes, this scales worse. The
benefit is that this really restricts usage of regulator to what is
supported, so allows to detect wrongly configured DTS.

Once coupling (or any other feature) is supported, each of such
restricted regulator bindings should be independently revised, instead
of adding this new feature to everything.

Best regards,
Krzysztof

  reply	other threads:[~2022-02-14 17:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 17:50 [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: maxim,max77693: convert to dtschema Krzysztof Kozlowski
2022-01-11 17:50 ` [PATCH v2 1/4] dt-bindings: leds: " Krzysztof Kozlowski
2022-01-11 22:29   ` Rob Herring
2022-01-11 17:50 ` [PATCH v2 2/4] dt-bindings: power: supply: " Krzysztof Kozlowski
2022-01-12 11:31   ` Sebastian Reichel
2022-01-11 17:50 ` [PATCH v2 3/4] regulator: dt-bindings: " Krzysztof Kozlowski
2022-01-11 22:30   ` Rob Herring
2022-02-14 16:41   ` Mark Brown
2022-02-14 16:45     ` Krzysztof Kozlowski
2022-02-14 16:51       ` Mark Brown
2022-02-14 17:01         ` Krzysztof Kozlowski [this message]
2022-02-14 17:07           ` Mark Brown
2022-02-14 17:28             ` Krzysztof Kozlowski
2022-01-11 17:50 ` [PATCH v2 4/4] dt-bindings: mfd: " Krzysztof Kozlowski
2022-01-12  2:26   ` Rob Herring
2022-02-06 17:36 ` [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: " Krzysztof Kozlowski
2022-02-07  9:35   ` Lee Jones
2022-02-14 14:14 ` [GIT PULL] Immutable branch between MFD, LED, Power and Regulator due for the v5.18 merge window Lee Jones

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=b0aaf1e6-c626-e68c-a0d2-4a7ff372b395@canonical.com \
    --to=krzysztof.kozlowski@canonical.com \
    --cc=broonie@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    --cc=sre@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.