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

Marek Vasut marex at denx.de
Thu Oct 17 19:43:18 CEST 2013


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 at samsung.com>
> Cc: Marek Vasut <marex at 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


More information about the U-Boot mailing list