All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-usb@vger.kernel.org, "Rafał Miłecki" <rafal@milecki.pl>,
	"Chuhong Yuan" <hslester96@gmail.com>
Subject: Re: [PATCH] USB: bcma: Make GPIO explicitly optional
Date: Tue, 8 Nov 2022 16:40:27 +0100	[thread overview]
Message-ID: <Y2p4a45q20Do/pdH@kroah.com> (raw)
In-Reply-To: <CACRpkdasVj1j6Jyik_fRp8_0TydhCXmB+edzG6kYsxacDgq3eg@mail.gmail.com>

On Mon, Nov 07, 2022 at 02:38:35PM +0100, Linus Walleij wrote:
> On Mon, Nov 7, 2022 at 10:07 AM Linus Walleij <linus.walleij@linaro.org> wrote:
> 
> > What the code does is to not check the return value from
> > devm_gpiod_get() and then avoid using an erroneous GPIO descriptor
> > with IS_ERR_OR_NULL().
> >
> > This will miss real errors from the GPIO core that should not be
> > ignored, such as probe deferral.
> >
> > Instead request the GPIO as explicitly optional, which means that
> > if it doesn't exist, the descriptor returned will be NULL.
> >
> > Then we can add error handling and also avoid just doing this on
> > the device tree path, and simplify the site where the optional
> > GPIO descriptor is used.
> >
> > There were some problems with cleaning up this GPIO descriptor
> > use in the past, but this is the proper way to deal with it.
> >
> > Cc: Rafał Miłecki <rafal@milecki.pl>
> > Cc: Chuhong Yuan <hslester96@gmail.com>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> 
> Actually I think this is something of a regression that needs
> a Cc: stable tag.
> 
> On my router (DIR-890L) this is needed for the USB ports to probe
> and work, I think due to recent refactorings involving device links
> and whatnot, i.e. probe deferral happens all the time and the
> deferral error has to be handled. I think many BCM systems are
> affected.

Now queued up for the next -rc release, thanks.

greg k-h

      reply	other threads:[~2022-11-08 15:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07  9:07 [PATCH] USB: bcma: Make GPIO explicitly optional Linus Walleij
2022-11-07 13:38 ` Linus Walleij
2022-11-08 15:40   ` Greg Kroah-Hartman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y2p4a45q20Do/pdH@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=hslester96@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rafal@milecki.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.