2022-04-20 14:42:48

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] dt-bindings: regulator: Add bindings for Silicon Mitus SM5703 regulators

On Tue, Apr 19, 2022 at 07:00:54PM +0300, Markuss Broks wrote:

> +description: |
> + SM5703 regulators node should be a sub node of the SM5703 MFD node. See SM5703 MFD
> + bindings at Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml

Why is this a separate binding with a compatible rather than just being
part of the main MFD binding? Alternatively, why aren't the regulators
described individually in the DT (ie, one node/compatible per regulator)?


Attachments:
(No filename) (478.00 B)
signature.asc (499.00 B)
Download all attachments

2022-04-20 18:26:14

by Markuss Broks

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] dt-bindings: regulator: Add bindings for Silicon Mitus SM5703 regulators

Hi Mark,

On 4/19/22 19:56, Mark Brown wrote:
> On Tue, Apr 19, 2022 at 07:00:54PM +0300, Markuss Broks wrote:
>
>> +description: |
>> + SM5703 regulators node should be a sub node of the SM5703 MFD node. See SM5703 MFD
>> + bindings at Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml
> Why is this a separate binding with a compatible rather than just being
> part of the main MFD binding? Alternatively, why aren't the regulators
> described individually in the DT (ie, one node/compatible per regulator)?

I took an example from the rohm,bd71847-pmic.yaml MFD binding, they have
regulators at a separate regulators { } node, with a separate dt-binding
for it. I'm not sure what should I do, I'd be more than happy to follow
a better example if you can show me it.

- Markuss

2022-04-22 14:16:47

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] dt-bindings: regulator: Add bindings for Silicon Mitus SM5703 regulators

On Tue, Apr 19, 2022 at 08:45:07PM +0300, Markuss Broks wrote:

> I took an example from the rohm,bd71847-pmic.yaml MFD binding, they have
> regulators at a separate regulators { } node, with a separate dt-binding for
> it. I'm not sure what should I do, I'd be more than happy to follow a better
> example if you can show me it.

Basically either just remove the compatible and have the MFD directly
instantiate the device like sky81452 or put a separate node for each
regualtor like wm831x does (but without any DT support).


Attachments:
(No filename) (537.00 B)
signature.asc (499.00 B)
Download all attachments

2022-04-22 22:59:24

by Matti Vaittinen

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] dt-bindings: regulator: Add bindings for Silicon Mitus SM5703 regulators

On Fri, Apr 22, 2022 at 9:05 PM Mark Brown <[email protected]> wrote:
>
> On Tue, Apr 19, 2022 at 08:45:07PM +0300, Markuss Broks wrote:
>
> > I took an example from the rohm,bd71847-pmic.yaml MFD binding, they have
> > regulators at a separate regulators { } node, with a separate dt-binding for
> > it. I'm not sure what should I do, I'd be more than happy to follow a better
> > example if you can show me it.
>
> Basically either just remove the compatible and have the MFD directly
> instantiate the device like sky81452 or put a separate node for each
> regualtor like wm831x does (but without any DT support).

Just a note that the BD71847 does not have own "compatible" for the
regulators. There's only "compatible" in the MFD node - and MFD just
kicks the regulator driver. Regulators get the handle to the node from
the parent device. I think it should serve as a valid example of what
Mark described as

> Basically either just remove the compatible and have the MFD directly
> instantiate the device


Best Regards
-- Matti Vaittinen