Devicetree
 help / color / mirror / Atom feed
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Linus Walleij <linusw@kernel.org>
Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
	Matti Vaittinen <matti.vaittinen@linux.dev>,
	Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Brian Masney <bmasney@redhat.com>,
	Bartosz Golaszewski <brgl@kernel.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	mfd@lists.linux.dev, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org
Subject: Re: [PATCH v2 01/10] dt-bindings: mfd: common ROHM PMIC properties
Date: Mon, 10 Aug 2026 08:41:52 +0300	[thread overview]
Message-ID: <e58db15b-9b31-42d9-b9f2-df792dd08804@gmail.com> (raw)
In-Reply-To: <CAD++jLky237PRXNmyURjNEOPPgFV00ox1HBeBev=qADxKM3nWQ@mail.gmail.com>

On 07/08/2026 23:23, Linus Walleij wrote:
> Hi Matti,
> 
> thanks for your patch (and the other comments in reply to the
> old review).

Nope. Thank You for taking the time to do the review - and read my replies!

> 
> On Tue, Aug 4, 2026 at 12:20 PM Matti Vaittinen
> <matti.vaittinen@linux.dev> wrote:
> 
>> Sometimes the existing properties aren't 100% what reviewers would
>> prefer. When issues are minor or just cosmetic, changing the existing
>> properties is not feasible. Reviewers can't be expected to know which
>> properties are new, and which are existing - and this can lead to
>> unnecessary review discussion wasting time and energy from everyone.
>>
>> Adding a common file for re-used ROHM PMIC properties should make it
>> clearly visible that a property is re-used, when a new PMIC binding
>> refers to this file instead of (re-)describing all the existing
>> bindings. This will also help keeping the common properties identical
>> across the variants.
>>
>> Add new file listing commonly used ROHM PMIC properties.
> 
> I see the upside of this, the DT binding maintainers will decide
> on it. It has the upside you describe, but it has the downside that
> new components will always (ab-)use the old properties maybe
> even when there would be a good opportunity to modernize
> the syntax, and then the reviewers will not catch it.

I see your point :) I am not intending to "completely hide" these 
properties from the reviewers. Please, see below.

> But well, maybe that is not a big deal in the universe.
> 
> What about patching those old bindings:
> Documentation/devicetree/bindings/mfd/rohm,bd71815-pmic.yaml:
> rohm,clkout-open-drain:
> Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml:
> rohm,clkout-open-drain:
> Documentation/devicetree/bindings/mfd/rohm,bd72720-pmic.yaml:
> rohm,clkout-open-drain:
> ...to include this file as part of this patch, and delete the old defines from
> those three files?

I am patching them. I, however, am not planning to delete the properties 
completely (the comment above about not hiding properties from 
reviewers). For example, the bd71815 and bd71828, do not support (at 
least all) of the OTP configured pins which are also declared here. 
Thus, I don't want to allow those unsupported pin properties for them.

My plan is to keep the "additionalProperties: false", and require the 
supported properties to be explicitly listed in the 
rohm,bd71828-pmic.yaml and rohm,bd72720-pmic.yaml. And, when the types, 
descriptions, and allowed values (when common for all PMICs) are in the 
referenced file, the rohm,bdXXXX-pmic.yaml can become quite simple:

rohm,clkout-open-drain: true;

Enough to remind reviewers that there is legacy - and allow reviewers as 
well as authors to re-evaluate the properties - while also pointing out 
that this is existing stuff. (And allow validator scripts to catch use 
of unsupported common properties - at least if this works as I think it 
does).

> Then it is clear what is going on.
> 
> Maybe this happens in later patches, but anyway it should be part
> of this patch I think.

I somehow thought it'd be clearer to split the changes in own patches - 
but I am fully Ok with squashing these if it is preferred way.

>> +properties:
>> +  rohm,clkout-open-drain:
>> +    description: clk32kout mode. Set to 1 for "open-drain" or 0 for "cmos"
>> +      a.k.a "push-pull".
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    maximum: 1
> 
> Yeah I see now that this is already in use in three other bindings...
> 
> Today we would for a new component use something like
> rohm,clkout-drive-mode = "drive-push-pull";
> rohm,clkout-drive-mode = "drive-open-drain";
> reflecting pin control.
> 
> I do understand the idea to keep using the same bindings
> for all of Rohm MFDs. But when a completely new design
> arrives with many new properties etc, maybe we can think
> of something new?

In case of the "rohm,clkout-open-drain" - AFAIR it is not used from new 
drivers, but the new PMICs which are added, are supported by the same 
MFD driver. I am not too keen on changing the property values in this 
driver (because it'd require every user to update their dtses - which 
feels like a source of problems). Nor am I too excited about supporting 
old and new values in this driver as it makes the driver (in my opinion 
unnecessarily) more complex.

What comes to using something else for completely new designs - I'd say 
(a bit cautiously) that changing the properties there is fine. 
Cautiously because it is still dancing between "what users have used to 
see" Vs. "what feels like best course of action - Today" ;) Cautiously 
also because we don't probably want to support multiple vendor specific 
properties for same purpose - at least not in a long run.

Yours,
	-- Matti

Ps, planning to join ELCE/Plumbers this year? It'd be about a time to 
meet you in person :)

-- 
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~

  reply	other threads:[~2026-08-10  5:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 10:19 [PATCH v2 00/10] Support ROHM BD73800 Matti Vaittinen
2026-08-04 10:20 ` [PATCH v2 01/10] dt-bindings: mfd: common ROHM PMIC properties Matti Vaittinen
2026-08-07 20:23   ` Linus Walleij
2026-08-10  5:41     ` Matti Vaittinen [this message]
2026-08-04 10:20 ` [PATCH v2 02/10] dt-bindings: rohm,bd*: Ref common ROHM bindings Matti Vaittinen
2026-08-04 10:21 ` [PATCH v2 03/10] dt-bindings: regulator: ROHM BD73800 regulators Matti Vaittinen
2026-08-04 12:31   ` Rob Herring (Arm)
2026-08-04 10:21 ` [PATCH v2 04/10] dt-bindings: mfd: ROHM BD73800 PMIC Matti Vaittinen
2026-08-04 12:31   ` Rob Herring (Arm)
2026-08-04 10:21 ` [PATCH v2 05/10] mfd: Support for ROHM BD73800 PMIC core Matti Vaittinen
2026-08-04 10:22 ` [PATCH v2 06/10] rtc: bd70528: Support RTC on ROHM BD73800 Matti Vaittinen
2026-08-04 10:22 ` [PATCH v2 07/10] regulator: bd71828: Support " Matti Vaittinen
2026-08-04 16:56   ` Mark Brown
2026-08-04 10:23 ` [PATCH v2 08/10] clk: bd718x7: " Matti Vaittinen
2026-08-04 10:23 ` [PATCH v2 09/10] gpio: bd73800: Support ROHM BD73800 PMIC GPIOs Matti Vaittinen
2026-08-07 20:29   ` Linus Walleij
2026-08-10  5:47     ` Matti Vaittinen
2026-08-04 10:23 ` [PATCH v2 10/10] MAINTAINERS: Add ROHM BD73800 PMIC files Matti Vaittinen

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=e58db15b-9b31-42d9-b9f2-df792dd08804@gmail.com \
    --to=mazziesaccount@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bmasney@redhat.com \
    --cc=brgl@kernel.org \
    --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=linusw@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=matti.vaittinen@linux.dev \
    --cc=mfd@lists.linux.dev \
    --cc=mturquette@baylibre.com \
    --cc=robh@kernel.org \
    --cc=sboyd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox