From: Lukasz Majewski <lukma@denx.de>
To: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Cc: Marek Vasut <marek.vasut+renesas@mailbox.org>,
u-boot@lists.denx.de,
Alexander Sverdlin <alexander.sverdlin@siemens.com>,
Felipe Balbi <felipe.balbi@linux.intel.com>,
Nishanth Menon <nm@ti.com>, Simon Glass <sjg@chromium.org>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH 3/6] usb: gadget: Drop usb_gadget_controller_number()
Date: Tue, 11 Jun 2024 10:51:27 +0200 [thread overview]
Message-ID: <20240611105127.3ab8cc38@wsk> (raw)
In-Reply-To: <877cew0wu6.fsf@baylibre.com>
[-- Attachment #1: Type: text/plain, Size: 4696 bytes --]
On Tue, 11 Jun 2024 09:20:33 +0200
Mattijs Korpershoek <mkorpershoek@baylibre.com> wrote:
> Hi Marek,
>
> Thank you for the patch.
>
> On dim., juin 09, 2024 at 23:32, Marek Vasut
> <marek.vasut+renesas@mailbox.org> wrote:
>
> > The bcdDevice field is defined as
> > |Device release number in binary-coded decimal
> > in the USB 2.0 specification. We use this field to distinguish the
> > UDCs from each other. In theory this could be used on the host side
> > to apply certain quirks if the "special" UDC in combination with
> > this gadget is used. This hasn't been done as far as I am aware. In
> > practice it would be better to fix the UDC driver before shipping
> > since a later release might not need this quirk anymore.
> >
> > This patch removes the newly unused function. Linux stopped using
> > this functionality in 2012, remove it from U-Boot as well.
> >
> > Matching Linux kernel commit:
> > ed9cbda63d45 ("usb: gadget: remove usb_gadget_controller_number()")
> >
> > Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
>
> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on vim3
>
> > ---
> > Cc: Alexander Sverdlin <alexander.sverdlin@siemens.com>
> > Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> > Cc: Lukasz Majewski <lukma@denx.de>
> > Cc: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> > Cc: Nishanth Menon <nm@ti.com>
> > Cc: Simon Glass <sjg@chromium.org>
> > Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
> > Cc: Tom Rini <trini@konsulko.com>
> > Cc: u-boot@lists.denx.de
> > ---
> > drivers/usb/gadget/gadget_chips.h | 62
> > ------------------------------- 1 file changed, 62 deletions(-)
> >
> > diff --git a/drivers/usb/gadget/gadget_chips.h
> > b/drivers/usb/gadget/gadget_chips.h index 98156c312d2..316051686c4
> > 100644 --- a/drivers/usb/gadget/gadget_chips.h
> > +++ b/drivers/usb/gadget/gadget_chips.h
> > @@ -146,65 +146,3 @@
> > #else
> > #define gadget_is_dwc2(g) 0
> > #endif
> > -
> > -/**
> > - * usb_gadget_controller_number - support bcdDevice id convention
> > - * @gadget: the controller being driven
> > - *
> > - * Return a 2-digit BCD value associated with the peripheral
> > controller,
> > - * suitable for use as part of a bcdDevice value, or a negative
> > error code.
> > - *
> > - * NOTE: this convention is purely optional, and has no meaning
> > in terms of
> > - * any USB specification. If you want to use a different
> > convention in your
> > - * gadget driver firmware -- maybe a more formal revision ID --
> > feel free.
> > - *
> > - * Hosts see these bcdDevice numbers, and are allowed (but not
> > encouraged!)
> > - * to change their behavior accordingly. For example it might
> > help avoiding
> > - * some chip bug.
> > - */
> > -static inline int usb_gadget_controller_number(struct usb_gadget
> > *gadget) -{
> > - if (gadget_is_net2280(gadget))
> > - return 0x01;
> > - else if (gadget_is_dummy(gadget))
> > - return 0x02;
> > - else if (gadget_is_sh(gadget))
> > - return 0x04;
> > - else if (gadget_is_goku(gadget))
> > - return 0x06;
> > - else if (gadget_is_mq11xx(gadget))
> > - return 0x07;
> > - else if (gadget_is_omap(gadget))
> > - return 0x08;
> > - else if (gadget_is_n9604(gadget))
> > - return 0x09;
> > - else if (gadget_is_at91(gadget))
> > - return 0x12;
> > - else if (gadget_is_imx(gadget))
> > - return 0x13;
> > - else if (gadget_is_musbhsfc(gadget))
> > - return 0x14;
> > - else if (gadget_is_musbhdrc(gadget))
> > - return 0x15;
> > - else if (gadget_is_atmel_usba(gadget))
> > - return 0x17;
> > - else if (gadget_is_fsl_usb2(gadget))
> > - return 0x18;
> > - else if (gadget_is_amd5536udc(gadget))
> > - return 0x19;
> > - else if (gadget_is_m66592(gadget))
> > - return 0x20;
> > - else if (gadget_is_ci(gadget))
> > - return 0x21;
> > - else if (gadget_is_dwc3(gadget))
> > - return 0x23;
> > - else if (gadget_is_cdns3(gadget))
> > - return 0x24;
> > - else if (gadget_is_max3420(gadget))
> > - return 0x25;
> > - else if (gadget_is_mtu3(gadget))
> > - return 0x26;
> > - else if (gadget_is_dwc2(gadget))
> > - return 0x27;
> > - return -ENOENT;
> > -}
> > --
> > 2.43.0
FInally..... :-)
Thanks Mattijs for this cleanup.
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2024-06-11 8:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-09 21:32 [PATCH 1/6] usb: gadget: g_dnl: Drop usb_gadget_controller_number() Marek Vasut
2024-06-09 21:32 ` [PATCH 2/6] usb: gadget: ether: " Marek Vasut
2024-06-11 7:16 ` Mattijs Korpershoek
2024-06-09 21:32 ` [PATCH 3/6] usb: gadget: " Marek Vasut
2024-06-11 7:20 ` Mattijs Korpershoek
2024-06-11 8:51 ` Lukasz Majewski [this message]
2024-06-11 9:20 ` Mattijs Korpershoek
2024-06-09 21:32 ` [PATCH 4/6] usb: gadget: Drop all gadget_is_*() functions Marek Vasut
2024-06-11 7:35 ` Mattijs Korpershoek
2024-06-09 21:32 ` [PATCH 5/6] usb: gadget: Add full ep_matches() check past .match_ep() callback Marek Vasut
2024-06-11 7:42 ` Mattijs Korpershoek
2024-06-09 21:32 ` [PATCH 6/6] usb: dwc3: gadget: Convert epautoconf workaround to match_ep callback Marek Vasut
2024-06-10 10:10 ` Sverdlin, Alexander
2024-06-11 7:56 ` Mattijs Korpershoek
2024-06-11 7:14 ` [PATCH 1/6] usb: gadget: g_dnl: Drop usb_gadget_controller_number() Mattijs Korpershoek
2024-07-05 12:02 ` Mattijs Korpershoek
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=20240611105127.3ab8cc38@wsk \
--to=lukma@denx.de \
--cc=Thinh.Nguyen@synopsys.com \
--cc=alexander.sverdlin@siemens.com \
--cc=felipe.balbi@linux.intel.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=mkorpershoek@baylibre.com \
--cc=nm@ti.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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