From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 17 Oct 2013 19:43:18 +0200 Subject: [U-Boot] [PATCH 4/4] usb: ums: add ums exit feature by ctrl+c or by detach usb cable In-Reply-To: <1381929675-26165-5-git-send-email-p.marczak@samsung.com> References: <1381929675-26165-1-git-send-email-p.marczak@samsung.com> <1381929675-26165-5-git-send-email-p.marczak@samsung.com> Message-ID: <201310171943.18666.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Przemyslaw Marczak, > This patch allows exiting from UMS mode to u-boot prompt > by detaching usb cable or by pressing ctrl+c. > > Add new config: CONFIG_USB_CABLE_CHECK. If defined then board > file should provide function: usb_cable_connected() (include/usb.h) > that return 1 if cable is connected and 0 otherwise. > > Signed-off-by: Przemyslaw Marczak > Cc: Marek Vasut > --- [...] > @@ -678,6 +679,18 @@ static int sleep_thread(struct fsg_common *common) > k++; > } > > + if (k == 10) { > + /* Handle CTRL+C */ > + if (ctrlc()) > + return -EPIPE; > +#ifdef CONFIG_USB_CABLE_CHECK Please document this newly added option in README. Best regards, Marek Vasut