All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
	"Lee Jones" <lee@kernel.org>, "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Lubomir Rintel" <lkundrak@v3.sk>,
	"Dmitry Osipenko" <digetx@gmail.com>,
	"Shree Ramamoorthy" <s-ramamoorthy@ti.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Joseph Chen" <chenjh@rock-chips.com>,
	"Chris Zhong" <zyw@rock-chips.com>,
	"Zhang Qing" <zhangqing@rock-chips.com>,
	"Sebastian Reichel" <sebastian.reichel@collabora.com>,
	"Andreas Kemnade" <andreas@kemnade.info>,
	"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
	"Julien Panis" <jpanis@baylibre.com>,
	"Alexander Kurz" <akurz@blala.de>,
	"André Draszik" <andre.draszik@linaro.org>
Cc: mfd@lists.linux.dev, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH 08/10] dt-bindings: mfd: rohm,bd71828-pmic: Use generic power-controller schema
Date: Wed, 5 Aug 2026 10:14:41 +0300	[thread overview]
Message-ID: <da3aece8-3ede-40cb-8f63-45614a965cd7@gmail.com> (raw)
In-Reply-To: <20260804-mfd-syspower-v1-8-a440783c2e78@nxp.com>

Hi Peng,

On 04/08/2026 17:16, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Switch the binding to use the generic power-controller schema instead by
> referencing power-controller.yaml and removing the local
> `system-power-controller` property definition.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>   Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml
> index 09e7d68e92bf..9818102e02c7 100644
> --- a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml
> +++ b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml
> @@ -15,6 +15,9 @@ description: |
>     single-cell linear charger. Also included is a Coulomb counter, a real-time
>     clock (RTC), and a 32.768 kHz clock gate.
>   
> +allOf:
> +  - $ref: /schemas/power/power-controller.yaml#
> +
>   properties:
>     compatible:
>       oneOf:
> @@ -79,8 +82,6 @@ properties:
>         used to mark the pins which should not be configured for GPIO. Please see
>         the ../gpio/gpio.txt for more information.
>   
> -  system-power-controller: true
> -
>   required:
>     - compatible
>     - reg
> @@ -91,7 +92,7 @@ required:
>     - gpio-controller
>     - "#gpio-cells"
>   
> -additionalProperties: false
> +unevaluatedProperties: false



If I am not mistaken, this allows all bindings from referenced common 
binding files, whether or not they are declared in this binding? If so, 
then this is probably not aligned with what I am hoping to do with the 
ROHM PMIC bindings [1] [2].

I hope to collect the commonly used ROHM PMIC bindings in one common 
file, and reference it from those PMIC files, which use some of those 
common properties. I would like to collect all of the commonly used ROHM 
MFD bindings in the same file because scattering them around in tiny 
files feels like a bad idea to me. This means that not all of the PMICs 
referencing this file, use all of the bindings from that file.

Hence I would prefer not to just allow everything from the common file - 
but to limit allowed properties to those that are explicitly mentioned 
for the specific PMIC. For example, my proposed change [1] moves:

rohm,clkout-open-drain, rohm,pin-clkout, rohm,pin-fault_b, 
"^rohm,pin-dvs[0-1]$" and "^rohm,pin-exten([0-1])?$" to 
rohm,pmic-pins.yaml. Only the rohm,clkout-open-drain should be supported 
allowed with the bd71828. Keeping:
additionalProperties: false

disallows the properties which aren't explicitly mentioned for the 
bd71828, while making it possible to keep the description, type and 
other common stuff in the common rohm,pmic-pins.yaml.



Also, keeping the single explicit line:

	system-power-controller: true

to denote this specific PMIC can act as a system power controller feels 
(to me) more descriptive than "hiding" it in

$ref: /schemas/power/power-controller.yaml#

- which is also a single line.

As a summary - would it work if you added the reference (for 
description), but also kept the explicit system-power-controller: true 
and also the additionalProperties: false?


[1] 
https://lore.kernel.org/all/838486b443af9188410d8b802a818dc0af20ea9d.1785838585.git.mazziesaccount@gmail.com/
[2] 
https://lore.kernel.org/all/d419dcf8776f7ea88e4a66b9a0f0087f11e6622c.1785838585.git.mazziesaccount@gmail.com/

Yours,
	-- Matti


>   examples:
>     - |
> 


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

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


WARNING: multiple messages have this Message-ID (diff)
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
	"Lee Jones" <lee@kernel.org>, "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Lubomir Rintel" <lkundrak@v3.sk>,
	"Dmitry Osipenko" <digetx@gmail.com>,
	"Shree Ramamoorthy" <s-ramamoorthy@ti.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Joseph Chen" <chenjh@rock-chips.com>,
	"Chris Zhong" <zyw@rock-chips.com>,
	"Zhang Qing" <zhangqing@rock-chips.com>,
	"Sebastian Reichel" <sebastian.reichel@collabora.com>,
	"Andreas Kemnade" <andreas@kemnade.info>,
	"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
	"Julien Panis" <jpanis@baylibre.com>,
	"Alexander Kurz" <akurz@blala.de>,
	"André Draszik" <andre.draszik@linaro.org>
Cc: mfd@lists.linux.dev, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH 08/10] dt-bindings: mfd: rohm,bd71828-pmic: Use generic power-controller schema
Date: Wed, 5 Aug 2026 10:14:41 +0300	[thread overview]
Message-ID: <da3aece8-3ede-40cb-8f63-45614a965cd7@gmail.com> (raw)
In-Reply-To: <20260804-mfd-syspower-v1-8-a440783c2e78@nxp.com>

Hi Peng,

On 04/08/2026 17:16, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Switch the binding to use the generic power-controller schema instead by
> referencing power-controller.yaml and removing the local
> `system-power-controller` property definition.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>   Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml
> index 09e7d68e92bf..9818102e02c7 100644
> --- a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml
> +++ b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml
> @@ -15,6 +15,9 @@ description: |
>     single-cell linear charger. Also included is a Coulomb counter, a real-time
>     clock (RTC), and a 32.768 kHz clock gate.
>   
> +allOf:
> +  - $ref: /schemas/power/power-controller.yaml#
> +
>   properties:
>     compatible:
>       oneOf:
> @@ -79,8 +82,6 @@ properties:
>         used to mark the pins which should not be configured for GPIO. Please see
>         the ../gpio/gpio.txt for more information.
>   
> -  system-power-controller: true
> -
>   required:
>     - compatible
>     - reg
> @@ -91,7 +92,7 @@ required:
>     - gpio-controller
>     - "#gpio-cells"
>   
> -additionalProperties: false
> +unevaluatedProperties: false



If I am not mistaken, this allows all bindings from referenced common 
binding files, whether or not they are declared in this binding? If so, 
then this is probably not aligned with what I am hoping to do with the 
ROHM PMIC bindings [1] [2].

I hope to collect the commonly used ROHM PMIC bindings in one common 
file, and reference it from those PMIC files, which use some of those 
common properties. I would like to collect all of the commonly used ROHM 
MFD bindings in the same file because scattering them around in tiny 
files feels like a bad idea to me. This means that not all of the PMICs 
referencing this file, use all of the bindings from that file.

Hence I would prefer not to just allow everything from the common file - 
but to limit allowed properties to those that are explicitly mentioned 
for the specific PMIC. For example, my proposed change [1] moves:

rohm,clkout-open-drain, rohm,pin-clkout, rohm,pin-fault_b, 
"^rohm,pin-dvs[0-1]$" and "^rohm,pin-exten([0-1])?$" to 
rohm,pmic-pins.yaml. Only the rohm,clkout-open-drain should be supported 
allowed with the bd71828. Keeping:
additionalProperties: false

disallows the properties which aren't explicitly mentioned for the 
bd71828, while making it possible to keep the description, type and 
other common stuff in the common rohm,pmic-pins.yaml.



Also, keeping the single explicit line:

	system-power-controller: true

to denote this specific PMIC can act as a system power controller feels 
(to me) more descriptive than "hiding" it in

$ref: /schemas/power/power-controller.yaml#

- which is also a single line.

As a summary - would it work if you added the reference (for 
description), but also kept the explicit system-power-controller: true 
and also the additionalProperties: false?


[1] 
https://lore.kernel.org/all/838486b443af9188410d8b802a818dc0af20ea9d.1785838585.git.mazziesaccount@gmail.com/
[2] 
https://lore.kernel.org/all/d419dcf8776f7ea88e4a66b9a0f0087f11e6622c.1785838585.git.mazziesaccount@gmail.com/

Yours,
	-- Matti


>   examples:
>     - |
> 


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

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

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  parent reply	other threads:[~2026-08-05  7:14 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 14:16 [PATCH 00/10] dt-bindings: mfd: Use generic power-controller schema Peng Fan (OSS)
2026-08-04 14:16 ` Peng Fan (OSS)
2026-08-04 14:16 ` [PATCH 01/10] dt-bindings: mfd: ene-kb[3]930: " Peng Fan (OSS)
2026-08-04 14:16   ` Peng Fan (OSS)
2026-08-04 15:11   ` sashiko-bot
2026-08-04 14:16 ` [PATCH 02/10] dt-bindings: mfd: ti,tps65910: " Peng Fan (OSS)
2026-08-04 14:16   ` Peng Fan (OSS)
2026-08-04 15:23   ` sashiko-bot
2026-08-05 21:12   ` Rob Herring
2026-08-05 21:12     ` Rob Herring
2026-08-04 14:16 ` [PATCH 03/10] dt-bindings: mfd: rockchip,rk8x: " Peng Fan (OSS)
2026-08-04 14:16   ` Peng Fan (OSS)
2026-08-04 15:30   ` sashiko-bot
2026-08-04 14:16 ` [PATCH 04/10] dt-bindings: mfd: ricoh,rn5t618: " Peng Fan (OSS)
2026-08-04 14:16   ` Peng Fan (OSS)
2026-08-04 15:34   ` sashiko-bot
2026-08-04 14:16 ` [PATCH 05/10] dt-bindings: mfd: netronix,ntxec: " Peng Fan (OSS)
2026-08-04 14:16   ` Peng Fan (OSS)
2026-08-04 15:44   ` sashiko-bot
2026-08-04 14:16 ` [PATCH 06/10] dt-bindings: mfd: ti,twl: " Peng Fan (OSS)
2026-08-04 14:16   ` Peng Fan (OSS)
2026-08-04 15:51   ` sashiko-bot
2026-08-04 14:16 ` [PATCH 07/10] dt-bindings: mfd: ti,tps6594: " Peng Fan (OSS)
2026-08-04 14:16   ` Peng Fan (OSS)
2026-08-04 15:55   ` sashiko-bot
2026-08-04 14:16 ` [PATCH 08/10] dt-bindings: mfd: rohm,bd71828-pmic: " Peng Fan (OSS)
2026-08-04 14:16   ` Peng Fan (OSS)
2026-08-04 16:01   ` sashiko-bot
2026-08-05  7:14   ` Matti Vaittinen [this message]
2026-08-05  7:14     ` Matti Vaittinen
2026-08-04 14:16 ` [PATCH 09/10] dt-bindings: mfd: fsl,mc13xxx: " Peng Fan (OSS)
2026-08-04 14:16   ` Peng Fan (OSS)
2026-08-04 16:10   ` sashiko-bot
2026-08-04 14:16 ` [PATCH 10/10] dt-bindings: mfd: samsung,s2mpg10-pmic: " Peng Fan (OSS)
2026-08-04 14:16   ` Peng Fan (OSS)
2026-08-04 16:14   ` sashiko-bot
2026-08-05 21:10 ` [PATCH 00/10] dt-bindings: mfd: " Rob Herring
2026-08-05 21:10   ` Rob Herring
2026-08-06  1:11   ` Peng Fan
2026-08-06  1:11     ` Peng Fan

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=da3aece8-3ede-40cb-8f63-45614a965cd7@gmail.com \
    --to=mazziesaccount@gmail.com \
    --cc=akurz@blala.de \
    --cc=andre.draszik@linaro.org \
    --cc=andreas@kemnade.info \
    --cc=chenjh@rock-chips.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=digetx@gmail.com \
    --cc=heiko@sntech.de \
    --cc=j.neuschaefer@gmx.net \
    --cc=jpanis@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=lkundrak@v3.sk \
    --cc=mfd@lists.linux.dev \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=robh@kernel.org \
    --cc=s-ramamoorthy@ti.com \
    --cc=sebastian.reichel@collabora.com \
    --cc=zhangqing@rock-chips.com \
    --cc=zyw@rock-chips.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 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.