diff mbox series

ASoC: dt-bindings: renesas,rsnd: add post-init-providers property

Message ID 87cylj7ul2.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State Superseded
Headers show
Series ASoC: dt-bindings: renesas,rsnd: add post-init-providers property | expand

Commit Message

Kuninori Morimoto Sept. 4, 2024, 7:21 a.m. UTC
sometimes, fwnode dependency cycles can be broken, and in such case,
rsnd driver will never be probed. To avoid such case, we would like to
use post-init-providers to avoid it.
Enable post-init-providers property on rsnd.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Rob Herring (Arm) Sept. 4, 2024, 3:07 p.m. UTC | #1
On Wed, Sep 04, 2024 at 07:21:14AM +0000, Kuninori Morimoto wrote:
> sometimes, fwnode dependency cycles can be broken, and in such case,
> rsnd driver will never be probed. To avoid such case, we would like to
> use post-init-providers to avoid it.
> Enable post-init-providers property on rsnd.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> index 07ec6247d9def..cb44478d9e420 100644
> --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> @@ -112,6 +112,10 @@ properties:
>      description: List of necessary clock names.
>      # details are defined below
>  
> +  post-init-providers:
> +    description: ignore fw_devlink dependency cycles and avoid driver probe dead-lock

Drop. Don't need to describe (again) what a common property is. If you 
want to say what your dependency cycle is, that would be good.

> +    $ref: /schemas/types.yaml#/definitions/phandle-array

Already has a type, don't define one again.

What you need, if you know, is how many entries (maxItems).

Rob
Saravana Kannan Sept. 4, 2024, 7:25 p.m. UTC | #2
On Wed, Sep 4, 2024 at 8:07 AM Rob Herring <robh@kernel.org> wrote:
>
> On Wed, Sep 04, 2024 at 07:21:14AM +0000, Kuninori Morimoto wrote:
> > sometimes, fwnode dependency cycles can be broken, and in such case,
> > rsnd driver will never be probed. To avoid such case, we would like to
> > use post-init-providers to avoid it.
> > Enable post-init-providers property on rsnd.

fwnode or fw_devlink cycles isn't broken. It's detecting the cycle
correctly. But it doesn't know one of the dependencies isn't an
initialization dependency. So you are providing additional information
to break the cycle. Please say something along those lines.

Here's a suggestion:

fw_devlink doesn't have enough information to break the cycle between
<list the device names>. Add post-init-providers property to <insert
the right device name> to indicate which link in the cycle to break.

-Saravana

> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
> >  Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> > index 07ec6247d9def..cb44478d9e420 100644
> > --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> > +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> > @@ -112,6 +112,10 @@ properties:
> >      description: List of necessary clock names.
> >      # details are defined below
> >
> > +  post-init-providers:
> > +    description: ignore fw_devlink dependency cycles and avoid driver probe dead-lock
>
> Drop. Don't need to describe (again) what a common property is. If you
> want to say what your dependency cycle is, that would be good.
>
> > +    $ref: /schemas/types.yaml#/definitions/phandle-array
>
> Already has a type, don't define one again.
>
> What you need, if you know, is how many entries (maxItems).
>
> Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index 07ec6247d9def..cb44478d9e420 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -112,6 +112,10 @@  properties:
     description: List of necessary clock names.
     # details are defined below
 
+  post-init-providers:
+    description: ignore fw_devlink dependency cycles and avoid driver probe dead-lock
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+
   # ports is below
   port:
     $ref: audio-graph-port.yaml#/definitions/port-base