All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: u-boot@lists.denx.de
Subject: [PATCH next v7 06/10] usb: gadget: Add bcdDevice for the MTU3 USB Gadget Controller
Date: Fri, 18 Sep 2020 17:10:09 +0800	[thread overview]
Message-ID: <1600420213-25974-7-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1600420213-25974-1-git-send-email-chunfeng.yun@mediatek.com>

Add an entry in usb_gadget_controller_number() for the MTU3
gadget controller. It is used to bind the USB Ethernet driver.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v4~v7: no changes

v3: new patch
---
 drivers/usb/gadget/gadget_chips.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h
index 587204c..0cdf47c 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -161,6 +161,12 @@
 #define gadget_is_max3420(g)        0
 #endif
 
+#ifdef CONFIG_USB_MTU3_GADGET
+#define gadget_is_mtu3(g)        (!strcmp("mtu3-gadget", (g)->name))
+#else
+#define gadget_is_mtu3(g)        0
+#endif
+
 /**
  * usb_gadget_controller_number - support bcdDevice id convention
  * @gadget: the controller being driven
@@ -224,5 +230,7 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
 		return 0x24;
 	else if (gadget_is_max3420(gadget))
 		return 0x25;
+	else if (gadget_is_mtu3(gadget))
+		return 0x26;
 	return -ENOENT;
 }
-- 
1.9.1

  parent reply	other threads:[~2020-09-18  9:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18  9:10 [PATCH next v7 00/10] Add support MediaTek USB3 DRD driver Chunfeng Yun
2020-09-18  9:10 ` [PATCH next v7 01/10] dt-binding: usb: add bindings for some common properties Chunfeng Yun
2020-10-13 14:15   ` Bin Meng
2020-09-18  9:10 ` [PATCH next v7 02/10] dt-bindings: usb: mtu3: add bindings for MediaTek USB3 DRD Chunfeng Yun
2020-10-13 14:18   ` Bin Meng
2020-10-14  2:46     ` Chunfeng Yun
2020-09-18  9:10 ` [PATCH next v7 03/10] usb: add USB_SPEED_SUPER_PLUS Chunfeng Yun
2020-10-13 14:19   ` Bin Meng
2020-10-14  2:50     ` Chunfeng Yun
2020-09-18  9:10 ` [PATCH next v7 04/10] usb: common: add define of usb_speed_string() Chunfeng Yun
2020-10-13 14:21   ` Bin Meng
2020-09-18  9:10 ` [PATCH next v7 05/10] usb: add MediaTek USB3 DRD driver Chunfeng Yun
2020-10-13 14:26   ` Bin Meng
2020-10-14  3:15     ` Chunfeng Yun
2020-09-18  9:10 ` Chunfeng Yun [this message]
2020-10-13 14:28   ` [PATCH next v7 06/10] usb: gadget: Add bcdDevice for the MTU3 USB Gadget Controller Bin Meng
2020-09-18  9:10 ` [PATCH next v7 07/10] arm: dts: mt8512: add usb related nodes Chunfeng Yun
2020-10-13 14:32   ` Bin Meng
2020-09-18  9:10 ` [PATCH next v7 08/10] configs: mt8512: enable fastboot Chunfeng Yun
2020-09-18  9:10 ` [PATCH next v7 09/10] configs: mt8512: add USB host related configs Chunfeng Yun
2020-10-13 14:34   ` Bin Meng
2020-10-14  3:40     ` Chunfeng Yun
2020-09-18  9:10 ` [PATCH next v7 10/10] MAINTAINERS: add USB driver to ARM MEDIATEK Chunfeng Yun
2020-10-13 14:35   ` Bin Meng
2020-09-28  2:01 ` [PATCH next v7 00/10] Add support MediaTek USB3 DRD driver Chunfeng Yun
2020-09-28  2:12   ` Marek Vasut
2020-09-28  2:20     ` Chunfeng Yun
2020-10-13  7:26     ` Chunfeng Yun
2020-10-13 10:27       ` Bin Meng

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=1600420213-25974-7-git-send-email-chunfeng.yun@mediatek.com \
    --to=chunfeng.yun@mediatek.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 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.