Re: [v5 3/5] dt-bindings: mfd: Add aspeed pwm-tach binding
From: Krzysztof Kozlowski
Date: Wed Jun 07 2023 - 04:56:38 EST
On 07/06/2023 08:26, Billy Tsai wrote:
> >>
> >> He felt what he was trying to accomplish met the documented
> >> expectations. Are there some changes that need to be done in mfd.txt to
> >> further clarify when to use it and when not to?
>
> > I think mfd.txt clearly states:
> > "For more complex devices, when the nexus driver has to
> > probe registers to figure out what child devices exist etc, this should
> > not be used. In the latter case the child devices will be determined by
> > the operating system."
>
> About the mfd:
> For our pwm and tach devices, there is no need to check/apply any hardware register from parent to determine child’s existence or functional.
> They don’t have any dependency on the parent node. In fact, it doesn’t require a specific driver to bind with the "aspeed,ast2600-pwm-tach" label. Their purpose is solely to share the same clock, reset phandle and base address. The main reason for using simple-mfd in this case is because these two independent devices share the same base address.
Actually one more thoughts. I have doubt that you have two independent
devices. If you share the clock, reset line and register address space,
this means *you do not have two independent devices*.
You have most likely only one device.
Best regards,
Krzysztof