From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Felipe Balbi <balbi@kernel.org>,
Greg KH <gregkh@linuxfoundation.org>,
USB mailing list <linux-usb@vger.kernel.org>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: Re: [PATCH 4/4] USB: gadget: Add a new bus for gadgets
Date: Mon, 9 May 2022 09:46:25 +0200 [thread overview]
Message-ID: <CAMuHMdUpOiHHMktPk_-NauDW2ufvGThnkFU7Pok376pM6OEyYw@mail.gmail.com> (raw)
In-Reply-To: <YnaR8LaaPTdLTiok@rowland.harvard.edu>
Hi Alan,
On Sat, May 7, 2022 at 5:36 PM Alan Stern <stern@rowland.harvard.edu> wrote:
> On Tue, May 03, 2022 at 11:48:33AM -0400, Alan Stern wrote:
> > On Tue, May 03, 2022 at 05:27:08PM +0200, Geert Uytterhoeven wrote:
> > > On Tue, May 3, 2022 at 5:14 PM Alan Stern <stern@rowland.harvard.edu> wrote:
> > > > On Tue, May 03, 2022 at 12:14:30PM +0200, Geert Uytterhoeven wrote:
> > > > > On Sat, 23 Apr 2022, Alan Stern wrote:
> > > > > > This patch adds a "gadget" bus and uses it for registering gadgets and
> > > > > > their drivers. From now on, bindings will be managed by the driver
> > > > > > core rather than through ad-hoc manipulations in the UDC core.
> > > > > >
> > > > > > As part of this change, the driver_pending_list is removed. The UDC
> > > > > > core won't need to keep track of unbound drivers for later binding,
> > > > > > because the driver core handles all of that for us.
> > > > > >
> > > > > > However, we do need one new feature: a way to prevent gadget drivers
> > > > > > from being bound to more than one gadget at a time. The existing code
> > > > > > does this automatically, but the driver core doesn't -- it's perfectly
> > > > > > happy to bind a single driver to all the matching devices on the bus.
> > > > > > The patch adds a new bitflag to the usb_gadget_driver structure for
> > > > > > this purpose.
> > > > > >
> > > > > > A nice side effect of this change is a reduction in the total lines of
> > > > > > code, since now the driver core will do part of the work that the UDC
> > > > > > used to do.
> > > > > >
> > > > > > A possible future patch could add udc devices to the gadget bus, say
> > > > > > as a separate device type.
> > > > > >
> > > > > > Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
> > > > >
> > > > > Thanks for your patch, which is now commit fc274c1e997314bf ("USB:
> > > > > gadget: Add a new bus for gadgets") in usb-next.
> > > > >
> > > > > This patch cause a regression on the Renesas Salvator-XS development
> > > > > board, as R-Car H3 has multiple USB gadget devices:
> > > >
> > > > Then these gadgets ought to have distinct names in order to avoid the
> > > > conflict below:
>
> Geert:
>
> Can you test the patch below? It ought to fix the problem (although it
Thanks!
root@h3-salvator-xs:~# ls -l /sys/bus/gadget/devices/
total 0
lrwxrwxrwx 1 root root 0 Feb 14 2019 gadget.0 ->
../../../devices/platform/soc/e659c000.usb/gadget.0
lrwxrwxrwx 1 root root 0 Feb 14 2019 gadget.1 ->
../../../devices/platform/soc/ee020000.usb/gadget.1
lrwxrwxrwx 1 root root 0 Feb 14 2019 gadget.2 ->
../../../devices/platform/soc/e6590000.usb/gadget.2
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
LGTM, so
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> might end up causing other problems down the line...)
Can you please elaborate? I'm not too familiar with UBS gadgets.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2022-05-09 8:08 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-20 19:45 [RFC PATCH 0/4] USB: gadget: Create a bus for gadgets Alan Stern
2022-03-20 19:47 ` [RFC PATCH 1/4] USB: gadget: Rename usb_gadget_probe_driver() Alan Stern
2022-03-20 19:48 ` [RFC PATCH 2/4] USB: gadget: Register udc before gadget Alan Stern
2022-03-20 19:50 ` [RFC PATCH 3/4] USB: gadget: Fix mistakes in UDC core kerneldoc Alan Stern
2022-03-20 19:51 ` [RFC PATCH 4/4] USB: gadget: Add a new bus for gadgets Alan Stern
2022-03-23 6:55 ` Pavan Kondeti
2022-03-23 13:14 ` Alan Stern
2022-03-22 12:57 ` [RFC PATCH 1/4] USB: gadget: Rename usb_gadget_probe_driver() Jun Li
2022-03-22 14:37 ` Alan Stern
2022-04-22 13:30 ` [RFC PATCH 0/4] USB: gadget: Create a bus for gadgets Greg KH
2022-04-24 0:42 ` [PATCH 1/4] USB: gadget: Rename usb_gadget_probe_driver() Alan Stern
2022-04-24 1:33 ` [PATCH 2/4] USB: gadget: Register udc before gadget Alan Stern
2022-04-24 1:34 ` [PATCH 3/4] USB: gadget: Fix mistakes in UDC core kerneldoc Alan Stern
2022-04-24 1:35 ` [PATCH 4/4] USB: gadget: Add a new bus for gadgets Alan Stern
2022-05-03 10:14 ` Geert Uytterhoeven
2022-05-03 14:54 ` Alan Stern
2022-05-03 15:27 ` Geert Uytterhoeven
2022-05-03 15:48 ` Alan Stern
2022-05-04 14:40 ` Greg KH
2022-05-07 15:36 ` Alan Stern
2022-05-09 7:46 ` Geert Uytterhoeven [this message]
2022-05-09 14:15 ` Alan Stern
2022-05-09 14:42 ` Geert Uytterhoeven
2022-05-09 15:05 ` Alan Stern
2022-05-09 16:23 ` Greg KH
2022-05-09 16:47 ` Alan Stern
2022-05-10 7:52 ` Greg KH
2022-05-10 15:51 ` [PATCH] USB: gadget: Add ID numbers to gadget names Alan Stern
2022-05-11 15:17 ` Greg KH
2022-05-11 16:58 ` Greg KH
2022-04-24 1:40 ` [RFC PATCH 0/4] USB: gadget: Create a bus for gadgets Alan Stern
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=CAMuHMdUpOiHHMktPk_-NauDW2ufvGThnkFU7Pok376pM6OEyYw@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=yoshihiro.shimoda.uh@renesas.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).