From patchwork Wed Oct 14 07:08:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 1381831 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=mediatek.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=mediatek.com header.i=@mediatek.com header.a=rsa-sha256 header.s=dk header.b=BRaEYcYT; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CB3TK0N08z9sVH for ; Wed, 14 Oct 2020 18:10:13 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E7B70823F9; Wed, 14 Oct 2020 09:09:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=mediatek.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=mediatek.com header.i=@mediatek.com header.b="BRaEYcYT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 767458242C; Wed, 14 Oct 2020 09:08:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MIME_BASE64_TEXT,RDNS_NONE,SPF_HELO_NONE, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from mailgw01.mediatek.com (unknown [210.61.82.183]) by phobos.denx.de (Postfix) with ESMTP id 17659823AA for ; Wed, 14 Oct 2020 09:08:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=mediatek.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=chunfeng.yun@mediatek.com X-UUID: 7d5d65909c394008a241303df886646b-20201014 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=3p8NiW83VrqzEYkqR9gLcszjwRwSWMzI+8A/jJsVglU=; b=BRaEYcYTtKiRBbY+trNRYa6Lxyqte7oqyVdoZX6ZQirc3UYkqBT4CQ6FoFxpnZf6T3RvmWupcAMgjP7Ki5tOLYdzx6OI6eOSCrnDN5sgq36PMR+jCxSIfhc0gITwAQYKSF8RRBm34rana4EcJ3suj2MCRkzJVrinQBM8v8WYpBc=; X-UUID: 7d5d65909c394008a241303df886646b-20201014 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1713032646; Wed, 14 Oct 2020 15:08:49 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 14 Oct 2020 15:08:46 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 14 Oct 2020 15:08:45 +0800 From: Chunfeng Yun To: Marek Vasut , Lukasz Majewski , Bin Meng CC: Mingming lee , Ryder Lee , Weijie Gao , Chunfeng Yun , GSS_MTK_Uboot_upstream , Heinrich Schuchardt , Lokesh Vutla , Simon Glass , Stefan Roese , Michal Simek , Stefan Bosch , Alex Nemirovsky , Rayagonda Kokatanur , Patrice Chotard , Sam Protsenko , Priyanka Jain , Amit Singh Tomar , Kever Yang , Jagan Teki , Frank Wang , T Karthik Reddy , Siva Durga Prasad Paladugu , Roger Quadros , , Tom Rini , Frank Wunderlich Subject: [PATCH v8 6/9] usb: gadget: Add bcdDevice for the MTU3 USB Gadget Controller Date: Wed, 14 Oct 2020 15:08:30 +0800 Message-ID: <1602659313-15391-7-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1602659313-15391-1-git-send-email-chunfeng.yun@mediatek.com> References: <1602659313-15391-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-MTK: N X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean 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 Reviewed-by: Bin Meng --- v8: add Reviewed-by Bin 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 587204cfb7..0cdf47c2dd 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; }