From patchwork Wed Nov 28 12:44:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pantelis Antoniou X-Patchwork-Id: 202244 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id F18D82C007A for ; Wed, 28 Nov 2012 02:09:51 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 24D024A128; Tue, 27 Nov 2012 16:09:09 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cxf4WtbwOQ6p; Tue, 27 Nov 2012 16:09:08 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ABC464A129; Tue, 27 Nov 2012 16:08:37 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D0F414A118 for ; Tue, 27 Nov 2012 15:57:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H0Y5v6mNL+tq for ; Tue, 27 Nov 2012 15:57:59 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from li42-95.members.linode.com (li42-95.members.linode.com [209.123.162.95]) by theia.denx.de (Postfix) with ESMTPS id 0217D4A11E for ; Tue, 27 Nov 2012 15:57:58 +0100 (CET) Received: from sles11esa.localdomain (unknown [195.97.110.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: panto) by li42-95.members.linode.com (Postfix) with ESMTPSA id 454809C1EF; Tue, 27 Nov 2012 14:52:11 +0000 (UTC) From: Pantelis Antoniou To: Marek Vasut , u-boot@lists.denx.de Date: Wed, 28 Nov 2012 14:44:01 +0200 Message-Id: <1354106642-4587-9-git-send-email-panto@antoniou-consulting.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1354106642-4587-1-git-send-email-panto@antoniou-consulting.com> References: <1354106642-4587-1-git-send-email-panto@antoniou-consulting.com> X-Mailman-Approved-At: Tue, 27 Nov 2012 16:08:31 +0100 Cc: Tom Rini , Pantelis Antoniou Subject: [U-Boot] [PATCH 8/9] Issue connect/disconnect as appropriate X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Call usb_gadget_connect/usb_gadget_disconnect in g_dnl_bind/g_dnl_unbind. Signed-off-by: Pantelis Antoniou --- drivers/usb/gadget/g_dnl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c index 7d87050..bbbfe02 100644 --- a/drivers/usb/gadget/g_dnl.c +++ b/drivers/usb/gadget/g_dnl.c @@ -83,7 +83,11 @@ static struct usb_gadget_strings *g_dnl_composite_strings[] = { static int g_dnl_unbind(struct usb_composite_dev *cdev) { - debug("%s\n", __func__); + struct usb_gadget *gadget = cdev->gadget; + + debug("%s: calling usb_gadget_disconnect for controller '%s'\n", shortname, gadget->name); + usb_gadget_disconnect(gadget); + return 0; } @@ -153,6 +157,9 @@ static int g_dnl_bind(struct usb_composite_dev *cdev) device_desc.bcdDevice = __constant_cpu_to_le16(0x9999); } + debug("%s: calling usb_gadget_connect for controller '%s'\n", shortname, gadget->name); + usb_gadget_connect(gadget); + return 0; error: