All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pantelis Antoniou <panto@antoniou-consulting.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 2/9] g_dnl: Issue connect/disconnect as appropriate
Date: Fri, 30 Nov 2012 20:01:05 +0200	[thread overview]
Message-ID: <1354298472-3605-3-git-send-email-panto@antoniou-consulting.com> (raw)
In-Reply-To: <1354298472-3605-1-git-send-email-panto@antoniou-consulting.com>

Call usb_gadget_connect/usb_gadget_disconnect in g_dnl_bind/g_dnl_unbind.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
---
 drivers/usb/gadget/g_dnl.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c
index 7d87050..25da733 100644
--- a/drivers/usb/gadget/g_dnl.c
+++ b/drivers/usb/gadget/g_dnl.c
@@ -83,7 +83,12 @@ 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 +158,10 @@ 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:
-- 
1.7.12

  parent reply	other threads:[~2012-11-30 18:01 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30 18:01 [U-Boot] [PATCH v3 0/9] USB: Gadget & DFU related fixes Pantelis Antoniou
2012-11-30 18:01 ` [U-Boot] [PATCH v3 1/9] usb: Fix bug when both DFU & ETHER are defined Pantelis Antoniou
2012-12-01  5:30   ` Marek Vasut
2012-12-03 10:10     ` Pantelis Antoniou
2012-11-30 18:01 ` Pantelis Antoniou [this message]
2012-11-30 18:01 ` [U-Boot] [PATCH v3 3/9] g_dnl: Properly terminate string list Pantelis Antoniou
2012-11-30 18:01 ` [U-Boot] [PATCH v3 4/9] dfu: Only perform DFU board_usb_init() for TRATS Pantelis Antoniou
2012-12-01  5:31   ` Marek Vasut
2012-11-30 18:01 ` [U-Boot] [PATCH v3 5/9] dfu: Fix crash when wrong number of arguments given Pantelis Antoniou
2012-11-30 18:01 ` [U-Boot] [PATCH v3 6/9] dfu: Send correct DFU response from composite_setup Pantelis Antoniou
2012-12-10 17:11   ` Lukasz Majewski
2012-12-10 18:21     ` Pantelis Antoniou
2012-12-10 19:26       ` Lukasz Majewski
2012-12-11  0:47         ` Marek Vasut
2012-12-11  8:40           ` Lukasz Majewski
2012-12-11 10:47           ` Wolfgang Denk
2012-12-11 13:44           ` Tom Rini
2012-12-12 17:55             ` Marek Vasut
2012-12-12 18:03               ` Tom Rini
2012-12-11 11:02         ` Lukasz Majewski
2012-12-11 11:23           ` Pantelis Antoniou
2012-12-11 11:28           ` Robert P. J. Day
2012-12-12 21:42             ` Marek Vasut
2012-12-12 21:40           ` Marek Vasut
2012-12-11 11:18         ` Lukasz Majewski
2012-11-30 18:01 ` [U-Boot] [PATCH v3 7/9] dfu: Properly zero out timeout value Pantelis Antoniou
2012-11-30 18:01 ` [U-Boot] [PATCH v3 8/9] dfu: Add a partition type target Pantelis Antoniou
2012-11-30 18:01 ` [U-Boot] [PATCH v3 9/9] dfu: Support larger than memory transfers Pantelis Antoniou
2013-02-12 20:51   ` Tom Rini
2013-02-18 10:01     ` Lukasz Majewski
2013-02-18 12:38       ` Marek Vasut
2013-02-18 13:51       ` Tom Rini
2013-02-18 21:08       ` Tom Rini
2013-02-20  7:17         ` Lukasz Majewski
2012-12-01  5:32 ` [U-Boot] [PATCH v3 0/9] USB: Gadget & DFU related fixes Marek Vasut

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=1354298472-3605-3-git-send-email-panto@antoniou-consulting.com \
    --to=panto@antoniou-consulting.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.