[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=MfxLNPgmNUHOuC8eRf1dyx88i4chzpJZGj7=7_4hrTg=g@mail.gmail.com>
Date: Wed, 22 Oct 2025 16:52:32 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Philipp Zabel <p.zabel@...gutronix.de>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>, "Rafael J. Wysocki" <rafael@...nel.org>,
Danilo Krummrich <dakr@...nel.org>, Krzysztof Kozlowski <krzk@...nel.org>, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH v2 7/9] reset: make the provider of reset-gpios the parent
of the reset device
On Wed, Oct 22, 2025 at 4:45 PM Philipp Zabel <p.zabel@...gutronix.de> wrote:
>
> On Mi, 2025-10-22 at 15:41 +0200, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> >
> > Auxiliary devices really do need a parent so ahead of converting the
> > reset-gpios driver to registering on the auxiliary bus, make the GPIO
> > device that provides the reset GPIO the parent of the reset-gpio device.
> > To that end move the lookup of the GPIO device by fwnode to the
> > beginning of __reset_add_reset_gpio_device() which has the added benefor
Wait... I remember fixing it and even mentioned it in the cover letter. :/
>
> Still typo: benefit.
>
> > of bailing out earlier, before allocating resources for the virtual
> > device, if the chip is not up yet.
> >
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> > ---
> > drivers/reset/core.c | 18 ++++++++++--------
> > 1 file changed, 10 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/reset/core.c b/drivers/reset/core.c
> > index 5a696e2dbcc224a633e2b321da53b7bc699cb5f3..ad85ddc8dd9fcf8b512cb09168586e0afca257f1 100644
> > --- a/drivers/reset/core.c
> > +++ b/drivers/reset/core.c
> [...]
> > @@ -919,6 +915,11 @@ static int __reset_add_reset_gpio_device(const struct of_phandle_args *args)
> > if (args->args_count != 2)
> > return -ENOENT;
> >
> > + struct gpio_device *gdev __free(gpio_device_put) =
> > + gpio_device_find_by_fwnode(of_fwnode_handle(args->np));
> > + if (!gdev)
> > + return -EPROBE_DEFER;
> > +
> > /*
> > * Registering reset-gpio device might cause immediate
> > * bind, resulting in its probe() registering new reset controller thus
>
> Please move this after the lockdep_assert_not_held(), as discussed.
>
Sorry, I missed that.
Bart
> With that change,
>
> Reviewed-by: Philipp Zabel <p.zabel@...gutronix.de>
>
> regards
> Philipp
Powered by blists - more mailing lists