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)?
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
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).
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