[U-Boot] [PATCH 4/4] usb: ums: add ums exit feature by ctrl+c or by detach usb cable

Marek Vasut
2013-10-17T17:43:18Z

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 <p.marczak@samsung.com>
> Cc: Marek Vasut <marex@denx.de>
> ---

[...]

> @@ -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