Re: [PATCH] of: property: Add device link support for interrupt-parent, dmas and -gpio(s)

From: Saravana Kannan
Date: Fri Nov 22 2019 - 14:19:27 EST

On Thu, Nov 21, 2019 at 11:38 PM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> On Wed, Nov 20, 2019 at 8:13 AM Saravana Kannan <saravanak@xxxxxxxxxx> wrote:
> > Add support for creating device links out of more DT properties.
> >
> > Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> > Cc: Vinod Koul <vkoul@xxxxxxxxxx>
> > Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>
> > Signed-off-by: Saravana Kannan <saravanak@xxxxxxxxxx>
> This looks to me like doing the right thing and making sure that
> the GPIO drivers get probed before their consumers and thus
> speed up boot.
> Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>


> I guess I should get on with adding device links at runtime
> as well, both for GPIO and pin control so that things work
> with runtime-added devices and boardfiles and ACPI, if I
> understand correctly it's fine to add the same link twice, it
> will just be ignored?

It's actually ref counted. So do check that the device_link_add()
succeeds before trying to release it later on [1].

[1] -