From: Chunfeng Yun Date: Mon, 17 Aug 2020 15:40:59 +0800 Subject: [PATCH v5 06/10] usb: gadget: Add bcdDevice for the MTU3 USB Gadget Controller In-Reply-To: <1597650063-9313-1-git-send-email-chunfeng.yun@mediatek.com> References: <1597650063-9313-1-git-send-email-chunfeng.yun@mediatek.com> Message-ID: <1597650063-9313-7-git-send-email-chunfeng.yun@mediatek.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- v4~v5: 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 91b0285..2dc4c47 100644 --- a/drivers/usb/gadget/gadget_chips.h +++ b/drivers/usb/gadget/gadget_chips.h @@ -155,6 +155,12 @@ #define gadget_is_cdns3(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 @@ -216,5 +222,7 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget) return 0x23; else if (gadget_is_cdns3(gadget)) return 0x24; + else if (gadget_is_mtu3(gadget)) + return 0x25; return -ENOENT; } -- 1.9.1